summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2016-11-21 21:26:34 +0200
committerAhmad Sherif <me@ahmadsherif.com>2016-11-23 12:57:58 +0200
commit74650b280bbe514115e1a085d00cb37c160f2d8e (patch)
tree1abd1b90cd558ebd318c2dda9e19e112a2ce8f51
parent4262687a978c9521b8025a08543942286989fb11 (diff)
downloadgitlab-ce-74650b280bbe514115e1a085d00cb37c160f2d8e.tar.gz
Change personal projects access level to master in User#project_authorizations_union
So that it matches the same access given in Projects::CreateService#after_create_actions
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 29fb849940a..223d84ba916 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -926,7 +926,7 @@ class User < ActiveRecord::Base
# Returns a union query of projects that the user is authorized to access
def project_authorizations_union
relations = [
- personal_projects.select("#{id} AS user_id, projects.id AS project_id, #{Gitlab::Access::OWNER} AS access_level"),
+ personal_projects.select("#{id} AS user_id, projects.id AS project_id, #{Gitlab::Access::MASTER} AS access_level"),
groups_projects.select_for_project_authorization,
projects.select_for_project_authorization,
groups.joins(:shared_projects).select_for_project_authorization