Project

General

Profile

« Previous | Next » 

Revision 381cb242

Added by Lukas Zapletal about 10 years ago

fixes #5205 - fixed all authorized links with given action

View differences:

app/helpers/application_helper.rb
# :authorizer : Specific authorizer to perform authorization on (handy to inject authorizer with base collection)
# :permission : Specific permission to check authorization on (handy on custom permission names)
def authorized_for(options)
action = options.delete(:auth_action) || options.delete(:action)
action = options.delete(:auth_action) || options[:action]
object = options.delete(:auth_object)
user = User.current
controller = options[:controller] || params[:controller]

Also available in: Unified diff