Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
48d563a3
Commit
48d563a3
authored
Sep 15, 2016
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop putting private tokens in Gon
parent
10c07226
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
9 deletions
+0
-9
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+0
-8
lib/gitlab/gon_helper.rb
lib/gitlab/gon_helper.rb
+0
-1
No files found.
app/assets/javascripts/api.js
View file @
48d563a3
...
...
@@ -16,9 +16,6 @@
.
replace
(
'
:id
'
,
group_id
);
return
$
.
ajax
({
url
:
url
,
data
:
{
private_token
:
gon
.
api_token
},
dataType
:
"
json
"
}).
done
(
function
(
group
)
{
return
callback
(
group
);
...
...
@@ -31,7 +28,6 @@
return
$
.
ajax
({
url
:
url
,
data
:
{
private_token
:
gon
.
api_token
,
search
:
query
,
per_page
:
20
},
...
...
@@ -46,7 +42,6 @@
return
$
.
ajax
({
url
:
url
,
data
:
{
private_token
:
gon
.
api_token
,
search
:
query
,
per_page
:
20
},
...
...
@@ -61,7 +56,6 @@
return
$
.
ajax
({
url
:
url
,
data
:
{
private_token
:
gon
.
api_token
,
search
:
query
,
order_by
:
order
,
per_page
:
20
...
...
@@ -74,7 +68,6 @@
newLabel
:
function
(
project_id
,
data
,
callback
)
{
var
url
=
Api
.
buildUrl
(
Api
.
labelsPath
)
.
replace
(
'
:id
'
,
project_id
);
data
.
private_token
=
gon
.
api_token
;
return
$
.
ajax
({
url
:
url
,
type
:
"
POST
"
,
...
...
@@ -93,7 +86,6 @@
return
$
.
ajax
({
url
:
url
,
data
:
{
private_token
:
gon
.
api_token
,
search
:
query
,
per_page
:
20
},
...
...
lib/gitlab/gon_helper.rb
View file @
48d563a3
...
...
@@ -11,7 +11,6 @@ module Gitlab
if
current_user
gon
.
current_user_id
=
current_user
.
id
gon
.
api_token
=
current_user
.
private_token
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment