forked from Gitlink/forgeplus
FIX request devops languages api authoure
This commit is contained in:
parent
e877c2cde6
commit
3290609bbc
|
@ -101,7 +101,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def simple
|
||||
json_response(@project)
|
||||
json_response(@project, current_user)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module ProjectsHelper
|
|||
(User.find_by_login identifier) || (User.find_by_mail identifier)
|
||||
end
|
||||
|
||||
def json_response(project)
|
||||
def json_response(project, user)
|
||||
repo = project.repository
|
||||
tmp_json = {}
|
||||
unless project.common?
|
||||
|
@ -45,7 +45,7 @@ module ProjectsHelper
|
|||
name: project.name,
|
||||
id: project.id,
|
||||
repo_id: repo.id,
|
||||
open_devops: project.open_devops?,
|
||||
open_devops: (user.blank? || user.is_a?(AnonymousUser)) ? false : project.open_devops?,
|
||||
type: project.numerical_for_project_type,
|
||||
author: {
|
||||
login: project.owner.login,
|
||||
|
|
Loading…
Reference in New Issue