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/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-25 19:18:27 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-25 19:18:27 +0400
commit5f3df89c64f9b93ce9b8f6a791c6d6d51fd18624 (patch)
tree55c96652bc1dcbfb51a04e52632307197ac44979 /lib
parent74e329064abc1306132dd73dcb2e25221379f568 (diff)
Fix teams + gitolite access
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/user_team_manager.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/gitlab/user_team_manager.rb b/lib/gitlab/user_team_manager.rb
index 7d9a9bdf3f5..82bb5a05879 100644
--- a/lib/gitlab/user_team_manager.rb
+++ b/lib/gitlab/user_team_manager.rb
@@ -79,12 +79,10 @@ module Gitlab
granted_access = max_teams_member_permission_in_project(user, project)
project_team_user = UsersProject.find_by_user_id_and_project_id(user.id, project.id)
+ project_team_user.destroy if project_team_user.present?
- if project_team_user.present?
- project_team_user.destroy
- end
-
- if project_team_user.blank? && granted_access > 0
+ # project_team_user.project_access != granted_access
+ if granted_access > 0
UsersProject.add_users_into_projects([project.id], [user.id], granted_access)
end
end