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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
19a38a0a
Commit
19a38a0a
authored
Mar 11, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo OAuth authentication should use 'bypass: true' to prevent writing
to the database
parent
5316aa63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/controllers/admin/geo_nodes_controller.rb
app/controllers/admin/geo_nodes_controller.rb
+1
-1
app/controllers/oauth/geo_auth_controller.rb
app/controllers/oauth/geo_auth_controller.rb
+1
-1
No files found.
app/controllers/admin/geo_nodes_controller.rb
View file @
19a38a0a
...
@@ -24,7 +24,7 @@ class Admin::GeoNodesController < Admin::ApplicationController
...
@@ -24,7 +24,7 @@ class Admin::GeoNodesController < Admin::ApplicationController
def
repair
def
repair
@node
=
GeoNode
.
find
(
params
[
:id
])
@node
=
GeoNode
.
find
(
params
[
:id
])
if
@node
.
primary?
||
!
@node
.
missing_oauth_application?
if
@node
.
primary?
||
!
@node
.
missing_oauth_application?
redirect_to
admin_geo_nodes_path
,
notice:
"This node doesn't need to be repaired."
redirect_to
admin_geo_nodes_path
,
notice:
"This node doesn't need to be repaired."
elsif
@node
.
save
elsif
@node
.
save
...
...
app/controllers/oauth/geo_auth_controller.rb
View file @
19a38a0a
...
@@ -25,7 +25,7 @@ class Oauth::GeoAuthController < ActionController::Base
...
@@ -25,7 +25,7 @@ class Oauth::GeoAuthController < ActionController::Base
user
=
User
.
find
(
remote_user
[
'id'
])
user
=
User
.
find
(
remote_user
[
'id'
])
if
user
&&
sign_in
(
user
)
if
user
&&
sign_in
(
user
,
bypass:
true
)
return_to
=
oauth
.
get_oauth_state_return_to
return_to
=
oauth
.
get_oauth_state_return_to
redirect_to
(
return_to
||
root_path
)
redirect_to
(
return_to
||
root_path
)
else
else
...
...
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