Beispiel #1
0
 def add_role(self, uid, role, project_id=None):
     """Add role for user (or user and project)"""
     if not project_id:
         db.user_add_role(context.get_admin_context(), uid, role)
         return
     db.user_add_project_role(context.get_admin_context(), uid, project_id,
                              role)
Beispiel #2
0
 def add_role(self, uid, role, project_id=None):
     """Add role for user (or user and project)"""
     if not project_id:
         db.user_add_role(context.get_admin_context(), uid, role)
         return
     db.user_add_project_role(context.get_admin_context(),
                              uid, project_id, role)