[ADD]simple去除访问限制,并加入字段
This commit is contained in:
parent
43b4907565
commit
27ec7ec7dd
|
@ -50,7 +50,9 @@ module ProjectsHelper
|
|||
repo_id: repo.id,
|
||||
open_devops: (user.blank? || user.is_a?(AnonymousUser)) ? false : project.open_devops?,
|
||||
type: project.numerical_for_project_type,
|
||||
author: render_owner(project)
|
||||
author: render_owner(project),
|
||||
is_secret: project.is_secret,
|
||||
user_apply_signatures: project.apply_signatures.with_user_id(user.id).collect{|s| {id: s.id, status: s.status}}
|
||||
}).compact
|
||||
|
||||
render json: tmp_json
|
||||
|
|
|
@ -7,6 +7,7 @@ module ProjectAbility
|
|||
|
||||
def can_read_project?(project)
|
||||
return true if self.admin?
|
||||
return true if project.is_secret
|
||||
return false if !project.is_public? && !project.member?(self.id)
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue