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

compatibility with redmine 3.4 #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/redmine_cas/account_controller_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module AccountControllerPatch
def self.included(base)
base.send(:include, InstanceMethods)
base.class_eval do
alias_method_chain :logout, :cas
alias_method :logout_without_cas, :logout
alias_method :logout, :logout_with_cas
end
end

Expand Down Expand Up @@ -55,7 +56,7 @@ def cas
end

def redirect_to_ref_or_default
default_url = url_for(params.merge(:ticket => nil))
default_url = url_for(params.delete(:ticket))
if params.has_key?(:ref)
# do some basic validation on ref, to prevent a malicious link to redirect
# to another site.
Expand Down
6 changes: 4 additions & 2 deletions lib/redmine_cas/application_controller_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ module ApplicationControllerPatch
def self.included(base)
base.send(:include, InstanceMethods)
base.class_eval do
alias_method_chain :verify_authenticity_token, :cas
alias_method_chain :require_login, :cas
alias_method :verify_authenticity_token_without_cas, :verify_authenticity_token
alias_method :verify_authenticity_token, :verify_authenticity_token_with_cas
alias_method :require_login_without_cas, :require_login
alias_method :require_login, :require_login_with_cas
end
end

Expand Down