Пример #1
0
 def __getattr__(self, permission):
     permission = Permission.by_name(permission)
     if permission and self.permissions:
         return is_in_list(permission.key(), self.permissions)
     return False        
Пример #2
0
 def has_permission(self, permission):
     return is_in_list(Permission.by_name(permission).key(), self.permissions)