diff options
author | miks <miks@cubesystems.lv> | 2012-09-07 00:14:42 +0400 |
---|---|---|
committer | miks <miks@cubesystems.lv> | 2012-09-07 00:14:42 +0400 |
commit | 2dc0519277417456372d6bde5c47bec895cc497e (patch) | |
tree | 96c08b6f68f11802847a5a9342d2f96e457abd1f /app/roles | |
parent | 3d3c6674fbea1b9099e80e1fc1768f85ecd3bf14 (diff) |
bulk access roles update/deletion added
Diffstat (limited to 'app/roles')
-rw-r--r-- | app/roles/team.rb | 13 |
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 |