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