Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/roles
diff options
context:
space:
mode:
authormiks <miks@cubesystems.lv>2012-09-07 00:14:42 +0400
committermiks <miks@cubesystems.lv>2012-09-07 00:14:42 +0400
commit2dc0519277417456372d6bde5c47bec895cc497e (patch)
tree96c08b6f68f11802847a5a9342d2f96e457abd1f /app/roles
parent3d3c6674fbea1b9099e80e1fc1768f85ecd3bf14 (diff)
bulk access roles update/deletion added
Diffstat (limited to 'app/roles')
-rw-r--r--app/roles/team.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/roles/team.rb b/app/roles/team.rb
index 27b1cc65897..d8798c507e3 100644
--- a/app/roles/team.rb
+++ b/app/roles/team.rb
@@ -36,4 +36,17 @@ module Team
UsersProject.bulk_import(self, users_ids, access_role)
self.update_repository
end
+
+ # Update multiple project users
+ # to same access role by user ids
+ def update_users_ids_to_role(users_ids, access_role)
+ UsersProject.bulk_update(self, users_ids, access_role)
+ self.update_repository
+ end
+
+ # Delete multiple users from project by user ids
+ def delete_users_by_ids(users_ids)
+ UsersProject.bulk_delete(self, users_ids)
+ self.update_repository
+ end
end