Skip to content

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

Open
osusoy wants to merge 1 commit intoifad:masterfrom
osusoy:master
Open

This commit deals with Issue #3 on your repo#4
osusoy wants to merge 1 commit intoifad:masterfrom
osusoy:master

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.

1 participant