Commit 4262687a authored by Ahmad Sherif's avatar Ahmad Sherif

Use the minimum access level of group link and group member when inserting...

Use the minimum access level of group link and group member when inserting authorized project records
parent d7eeb6df
...@@ -65,7 +65,7 @@ class Group < Namespace ...@@ -65,7 +65,7 @@ class Group < Namespace
def select_for_project_authorization def select_for_project_authorization
if current_scope.joins_values.include?(:shared_projects) 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 else
super super
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment