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/open_project/global_roles/patches/users_controller_patch.rb

25 lines
538 B

require_dependency "users_controller"
module OpenProject::GlobalRoles::Patches
module UsersControllerPatch
def self.included(base) # :nodoc:
base.send(:include, InstanceMethods)
base.class_eval do
unloadable
before_filter :add_global_roles, :only => [:edit]
end
end
module InstanceMethods
private
def add_global_roles
@global_roles = GlobalRole.all
end
end
end
end
UsersController.send(:include, OpenProject::GlobalRoles::Patches::UsersControllerPatch)