提交 d0efe2c0 编写于 作者: D Dmitriy Zaporozhets

Since masters_projects does not cover most of cases now we use...

Since masters_projects does not cover most of cases now we use authorized_projects for DeployKey read access
上级 b1dbabde
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册