Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Fixed logout #24

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Fixed logout #24

wants to merge 6 commits into from

Conversation

acosonic
Copy link

Logout wasn't working, when redmine is accessed again, user was automatically logged in.

@@ -1,3 +1,5 @@
_this fork is onelogin modifications of:_
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment shall be removed

@@ -0,0 +1,6 @@
RedmineApp::Application.routes.draw do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be included

user = self.find_by_login(user_attributes[:login])
unless user
user = EmailAddress.find_by(address: user_attributes[:mail]).try(:user)
if user.nil? && Redmine::OmniAuthSAML.onthefly_creation?
user = new user_attributes
user = User.new(:status => 1, :language => Setting.default_language)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the code can be changed to:

new user_attributes.merge(:status => 1, :language => Setting.default_language)

user = new user_attributes
user = User.new(:status => 1, :language => Setting.default_language)
# user = new user_attributes
user.mail = user_attributes[:mail]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code is useless because of previous suggested (or original) initialization

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants