This commit deals with Issue #3 on your repo#4
Open
osusoy wants to merge 1 commit intoifad:masterfrom
Open
Conversation
Use Case:
- CAS login enabled
- CAS auto_create_users disabled
- login_required site setting enabled
- User logged into CAS as a user that is not in Redmine
The conditions above caused an eternal loop:
- CAS check detects valid TGT but login fails, redirecting the user
to home page, which is protected so redirects to CAS check etc.
Implemented Fix:
- Created account/invalid_cas_user view with options to:
- Login locally or
- Logout and return to CAS server to login as valid user.
- Modified logout behavior to prevent CAS logout if the user chose
the first option and logged in locally. In this case, the user is
redirected to the invalid_cas_user view (inherant behavior)
- Added strings used in the fix to en locale file (and tidied up
the ones that were already there.
NOTE:
I am using i18n v0.5.0 so vars in en.yml use its formatting. If
you're using an older version, you would need to replace
${some var} entries with {{some var}}
new file: app/views/account/invalid_cas_user.rhtml
modified: config/locales/en.yml
modified: lib/redmine_cas.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use Case:
The conditions above caused an eternal loop:
to home page, which is protected so redirects to CAS check etc.
Implemented Fix:
the first option and logged in locally. In this case, the user is
redirected to the invalid_cas_user view (inherant behavior)
the ones that were already there.
NOTE:
I am using i18n v0.5.0 so vars in en.yml use its formatting. If
you're using an older version, you would need to replace
${some var} entries with {{some var}}