Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This commit deals with Issue #3 on your repo #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

osusoy
Copy link

@osusoy osusoy commented May 7, 2011

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant