Revision 355bce36
Added by Ohad Levy over 10 years ago
app/services/menu/item.rb | ||
---|---|---|
end
|
||
|
||
def authorized?
|
||
User.current.allowed_to?({
|
||
:controller => url_hash[:controller].to_s.gsub(/::/, "_").underscore,
|
||
:action => url_hash[:action]
|
||
})
|
||
User.current.allowed_to?(url_hash.slice(:controller, :action, :id))
|
||
rescue => error
|
||
Rails.logger.error "#{error.message} (#{error.class})\n#{error.backtrace.join("\n")}"
|
||
false
|
Also available in: Unified diff
fixes #3930 - refactoring of edit_self implementation.