add User.is_admin()
This commit is contained in:
parent
2ed09a5b3f
commit
f886f9e9dc
1 changed files with 3 additions and 0 deletions
|
@ -161,6 +161,9 @@ class User(UserBase):
|
||||||
# user already existed
|
# user already existed
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def is_admin(self) -> bool:
|
||||||
|
return UserCapability.admin in self.capabilities
|
||||||
|
|
||||||
def authenticate(
|
def authenticate(
|
||||||
self,
|
self,
|
||||||
db: Session,
|
db: Session,
|
||||||
|
|
Loading…
Reference in a new issue