diff options
Diffstat (limited to 'app/services/users/refresh_authorized_projects_service.rb')
-rw-r--r-- | app/services/users/refresh_authorized_projects_service.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/services/users/refresh_authorized_projects_service.rb b/app/services/users/refresh_authorized_projects_service.rb index 1850fa9747d..2d9766c3c56 100644 --- a/app/services/users/refresh_authorized_projects_service.rb +++ b/app/services/users/refresh_authorized_projects_service.rb @@ -67,10 +67,8 @@ module Users def update_authorizations(remove = [], add = []) log_refresh_details(remove, add) - User.transaction do - user.remove_project_authorizations(remove) unless remove.empty? - ProjectAuthorization.insert_authorizations(add) unless add.empty? - end + user.remove_project_authorizations(remove) unless remove.empty? + ProjectAuthorization.insert_authorizations(add) unless add.empty? # Since we batch insert authorization rows, Rails' associations may get # out of sync. As such we force a reload of the User object. |