OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/costs_access_control_patch.rb

30 lines
741 B

require_dependency 'redmine/access_control'
module CostsAccessControlPatch
def self.included(base) # :nodoc:
#base.extend(ClassMethods)
base.class_eval do
class << self
def allowed_actions_with_inheritance(permission_name)
my_actions = allowed_actions_without_inheritance(permission_name)
perm = permission(permission_name)
if perm.respond_to? :inherits
my_actions | permission(permission_name).inherits.collect(&:actions)
else
my_actions
end
end
alias_method_chain :allowed_actions, :inheritance
end
end
end
module ClassMethods
end
end
Redmine::AccessControl.send(:include, CostsAccessControlPatch)