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/global_roles/principal_patch.rb

23 lines
435 B

require_dependency "principal"
module GlobalRoles
module PrincipalPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
base.class_eval do
unloadable
has_many :principal_roles
has_many :global_roles, :through => :principal_roles, :source => :role
end
end
module InstanceMethods
end
end
end
Principal.send(:include, GlobalRoles::PrincipalPatch)