Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
redmine-oauth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MyECP
redmine-oauth
Commits
69d314b1
Commit
69d314b1
authored
12 years ago
by
Dmitriy Brodnitskiy
Browse files
Options
Downloads
Patches
Plain Diff
add redirect after login
parent
f204885d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/redmine_oauth_controller.rb
+3
-0
3 additions, 0 deletions
app/controllers/redmine_oauth_controller.rb
app/views/hooks/_view_account_login_bottom.html.erb
+1
-1
1 addition, 1 deletion
app/views/hooks/_view_account_login_bottom.html.erb
with
4 additions
and
1 deletion
app/controllers/redmine_oauth_controller.rb
+
3
−
0
View file @
69d314b1
...
...
@@ -6,6 +6,7 @@ class RedmineOauthController < AccountController
include
Helpers
::
Checker
def
oauth_google
if
Setting
.
plugin_redmine_omniauth_google
[
:oauth_authentification
]
session
[
:back_url
]
=
params
[
:back_url
]
redirect_to
oauth_client
.
auth_code
.
authorize_url
(
:redirect_uri
=>
oauth_google_callback_url
,
:scope
=>
scopes
)
else
password_authentication
...
...
@@ -30,6 +31,8 @@ class RedmineOauthController < AccountController
end
def
try_to_login
info
params
[
:back_url
]
=
session
[
:back_url
]
session
.
delete
(
:back_url
)
user
=
User
.
find_or_initialize_by_mail
(
info
[
"email"
])
if
user
.
new_record?
# Self-registration off
...
...
This diff is collapsed.
Click to expand it.
app/views/hooks/_view_account_login_bottom.html.erb
+
1
−
1
View file @
69d314b1
<%=
stylesheet_link_tag
'buttons'
,
:plugin
=>
'redmine_omniauth_google'
%>
<%
if
Setting
.
plugin_redmine_omniauth_google
[
:oauth_authentification
]
%>
<%=
link_to
oauth_google_path
do
%>
<%=
link_to
oauth_google_path
(
:back_url
=>
back_url
)
do
%>
<%=
button_tag
:class
=>
'button-login'
do
%>
<%=
image_tag
(
'/plugin_assets/redmine_omniauth_google/images/google_login_icon.png'
,
:class
=>
'button-login-icon'
,
:alt
=>
l
(
:login_via_google
))
%>
<%=
content_tag
:div
,
l
(
:login_via_google
),
:class
=>
'button-login-text'
%>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment