fix setting gon.api_token
This commit is contained in:
parent
bdcaf21ea7
commit
10f14136f5
1 changed files with 4 additions and 2 deletions
|
@ -152,7 +152,9 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def add_gon_variables
|
def add_gon_variables
|
||||||
gon.default_issues_tracker = Project.issues_tracker.default_value
|
gon.default_issues_tracker = Project.issues_tracker.default_value
|
||||||
|
if current_user
|
||||||
gon.api_token = current_user.private_token
|
gon.api_token = current_user.private_token
|
||||||
gon.gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
|
gon.gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue