From 1bd4e320b3c53892c167f0ec84ca240efd2e5e9d Mon Sep 17 00:00:00 2001 From: Sebastian Schuster Date: Mon, 1 Jul 2013 15:26:21 +0200 Subject: [PATCH] Removed dead code from RolesController patch --- .../patches/roles_controller_patch.rb | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/lib/open_project/global_roles/patches/roles_controller_patch.rb b/lib/open_project/global_roles/patches/roles_controller_patch.rb index 84b05a6480..dd1d420acc 100644 --- a/lib/open_project/global_roles/patches/roles_controller_patch.rb +++ b/lib/open_project/global_roles/patches/roles_controller_patch.rb @@ -4,23 +4,12 @@ module OpenProject::GlobalRoles::Patches base.send(:include, InstanceMethods) base.class_eval do - #alias_method_chain :new, :global_roles alias_method_chain :create, :global_roles - #alias_method_chain :index, :global_roles alias_method_chain :new, :global_roles end end module InstanceMethods - # def create - # if params['global_role'] - # create_global_role - # else - # new - - # render :template => 'roles/new' if @role.errors.size > 0 - # end - # end def new_with_global_roles new_without_global_roles @@ -32,8 +21,6 @@ module OpenProject::GlobalRoles::Patches def create_with_global_roles if params['global_role'] create_global_role - #@member_permissions = (@role.setable_permissions || @permissions) - #@global_permissions = GlobalRole.setable_permissions else create_without_global_roles @@ -42,20 +29,6 @@ module OpenProject::GlobalRoles::Patches end end - # def index_with_global_roles - # @role_pages, @roles = paginate :roles, :per_page => 25, :order => 'builtin, position' - # respond_to do |format| - # format.html {render :action => 'index'} - # format.js {render :action => 'index', :layout => false} - # end - # end - - # def update - # edit - - # render :template => 'roles/edit' if @role.errors.size > 0 - # end - private def create_global_role @@ -70,13 +43,6 @@ module OpenProject::GlobalRoles::Patches render :template => 'roles/new' end end - - # def standard_member_and_global_assigns - # @member_permissions = (@member_role.setable_permissions || @permissions) - # @global_permissions = GlobalRole.setable_permissions - # @global_roles = GlobalRole.all - # @member_roles = (Role.all || @roles) - # end end end end