Since masters_projects does not cover most of cases now we use authorized_projects for DeployKey read access
This commit is contained in:
parent
b1dbabdec3
commit
d0efe2c07c
1 changed files with 1 additions and 3 deletions
|
@ -91,8 +91,6 @@ class User < ActiveRecord::Base
|
|||
has_many :groups_projects, through: :groups, source: :projects
|
||||
has_many :personal_projects, through: :namespace, source: :projects
|
||||
has_many :projects, through: :users_projects
|
||||
has_many :master_projects, through: :users_projects, source: :project,
|
||||
conditions: { users_projects: { project_access: UsersProject::MASTER } }
|
||||
has_many :own_projects, foreign_key: :creator_id, class_name: 'Project'
|
||||
has_many :owned_projects, through: :namespaces, source: :projects
|
||||
|
||||
|
@ -355,7 +353,7 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def accessible_deploy_keys
|
||||
DeployKey.in_projects(self.master_projects).uniq
|
||||
DeployKey.in_projects(self.authorized_projects).uniq
|
||||
end
|
||||
|
||||
def created_by
|
||||
|
|
Loading…
Reference in a new issue