コード例 #1
0
ファイル: account.py プロジェクト: kelly-mcdougall/doaj
 def has_role(self, role):
     return Authorise.has_role(role, self.data.get("role", []))
コード例 #2
0
ファイル: account.py プロジェクト: kelly-mcdougall/doaj
 def all_top_level_roles(cls):
     return Authorise.top_level_roles()
コード例 #3
0
ファイル: account.py プロジェクト: kelly-mcdougall/doaj
 def is_super(self):
     # return not self.is_anonymous() and self.id in app.config['SUPER_USER']
     return Authorise.has_role(app.config["SUPER_USER_ROLE"], self.data.get("role", []))