Skip to content

Commit

Permalink
Added requuired user properties and methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhand committed Sep 1, 2023
1 parent b1e06aa commit 86a11b6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/dioptra/restapi/user/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ def update(self, changes: dict[str, Any]):

return self

def is_authenticated(self) -> bool:
return True

def is_active(self) -> bool:
return True

def is_anonymous(self) -> bool:
return False

def get_id(self) -> str:
return str(self.user_id)


class UserRegistrationForm(FlaskForm):
"""The user registration form.
Expand Down

0 comments on commit 86a11b6

Please sign in to comment.