add User.is_admin()

This commit is contained in:
Jörn-Michael Miehe 2022-03-23 13:23:33 +00:00
parent 2ed09a5b3f
commit f886f9e9dc

View file

@ -161,6 +161,9 @@ class User(UserBase):
# user already existed
pass
def is_admin(self) -> bool:
return UserCapability.admin in self.capabilities
def authenticate(
self,
db: Session,