diff --git a/api/kiwi_vpn_api/db_new/user.py b/api/kiwi_vpn_api/db_new/user.py index b8cd6ec..2e53964 100644 --- a/api/kiwi_vpn_api/db_new/user.py +++ b/api/kiwi_vpn_api/db_new/user.py @@ -109,6 +109,9 @@ class User(UserBase, table=True): db.delete(self) db.commit() + def can(self, capability: Capability) -> bool: + return capability in self.get_capabilities() + def get_capabilities(self) -> set[Capability]: return set( capability._