fix setting gon.api_token
This commit is contained in:
parent
bdcaf21ea7
commit
10f14136f5
|
@ -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
|
||||||
gon.api_token = current_user.private_token
|
if current_user
|
||||||
gon.gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
|
gon.api_token = current_user.private_token
|
||||||
|
gon.gravatar_url = request.ssl? ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue