Permalink
Browse files

Added possibility to enable or disable CAS logout

  • Loading branch information...
1 parent 7a852b8 commit 1f7326893e6d5b5ab2d1ea60688b95d15879e979 @brenard brenard committed Dec 7, 2011
Showing with 8 additions and 3 deletions.
  1. +4 −0 app/views/settings/_settings.html.erb
  2. +4 −3 lib/redmine_cas.rb
@@ -23,4 +23,8 @@
<%= check_box_tag 'settings[auto_update_attributes_on_login]', true, @settings[:auto_update_attributes_on_login] %><br />
<em>On each login update Redmine user attributes from CAS extra user attributes</em>
</p>
+ <p>
+ <label>Logout user in CAS</label>
+ <%= check_box_tag 'settings[cas_logout]', true, @settings[:cas_logout] %><br />
+ </p>
</fieldset>
View
@@ -25,7 +25,8 @@
:cas_base_url => 'https://localhost',
:login_without_cas => false,
:auto_create_users => false,
- :auto_update_attributes_on_login => false
+ :auto_update_attributes_on_login => false,
+ :cas_logout => true
}, :partial => 'settings/settings'
end
@@ -228,7 +229,7 @@ def login_with_cas
alias_method_chain :login, :cas
def logout_with_cas
- if RedmineCas.ready?
+ if RedmineCas.ready? and RedmineCas.get_setting(:cas_logout)
CASClient::Frameworks::Rails::Filter.logout(self, home_url)
logout_user
else
@@ -242,4 +243,4 @@ def logout_with_cas
end
-end
+end

0 comments on commit 1f73268

Please sign in to comment.