Exemplo n.º 1
0
 def role_functions(self):
     functions = []
     if self.role == 'ADMIN':
         for f in role_policy_functions.itervalues():
             functions += f
     else:
         for p in user_role_polices.get(self.role).get('policies'):
             functions += role_policy_functions.get(p)
     return list(set(functions))
Exemplo n.º 2
0
 def role_description(self):
     return user_role_polices.get(self.role).get('description')
Exemplo n.º 3
0
 def role_title(self):
     return user_role_polices.get(self.role).get('title')