diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-11-21 16:38:54 +0200 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-11-23 12:57:54 +0200 |
commit | 4262687a978c9521b8025a08543942286989fb11 (patch) | |
tree | 093d57a67447c7d728dd116aa8e3d6b90868052e /app/models | |
parent | d7eeb6df51ffe2ad864ef49d0e465b88ab158520 (diff) | |
download | gitlab-ce-4262687a978c9521b8025a08543942286989fb11.tar.gz |
Use the minimum access level of group link and group member when inserting authorized project records
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/group.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 73b0f1c6572..40ba8b6a34d 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -65,7 +65,7 @@ class Group < Namespace def select_for_project_authorization if current_scope.joins_values.include?(:shared_projects) - select("members.user_id, projects.id AS project_id, project_group_links.group_access") + select("members.user_id, projects.id AS project_id, LEAST(project_group_links.group_access, members.access_level) AS access_level") else super end |