예제 #1
0
 def scim_patch_role(self, context, role_id, **role):
     key_role = conv.role_scim2key(role)
     self._require_matching_id(role_id, key_role)
     self._require_matching_domain_id(role_id, role, self.load_role)
     ref = self.assignment_api.update_role(role_id, key_role)
     return conv.role_key2scim(ref, path=context["path"])
예제 #2
0
 def scim_patch_role(self, context, role_id, **role):
     key_role = conv.role_scim2key(role)
     self._require_matching_id(role_id, key_role)
     self._require_matching_domain_id(role_id, role, self.load_role)
     ref = self.assignment_api.update_role(role_id, key_role)
     return conv.role_key2scim(ref, path=context['path'])
예제 #3
0
 def scim_create_role(self, context, **kwargs):
     self._require_attribute(kwargs, "name")
     key_role = conv.role_scim2key(kwargs)
     ref = self._assign_unique_id(key_role)
     created_ref = self.assignment_api.create_role(ref["id"], ref)
     return conv.role_key2scim(created_ref, path=context["path"])
예제 #4
0
 def scim_create_role(self, context, **kwargs):
     self._require_attribute(kwargs, 'name')
     key_role = conv.role_scim2key(kwargs)
     ref = self._assign_unique_id(key_role)
     created_ref = self.assignment_api.create_role(ref['id'], ref)
     return conv.role_key2scim(created_ref, path=context['path'])