diff options
Diffstat (limited to 'app/controllers/roles_controller.rb')
-rw-r--r-- | app/controllers/roles_controller.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index 5f3885267..29e7604dc 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -18,10 +18,9 @@ class RolesController < ApplicationController layout 'admin' - before_filter :require_admin, :except => :index - before_filter :require_admin_or_api_request, :only => :index - before_filter :find_role, :only => [:edit, :update, :destroy] - accept_api_auth :index + before_filter :require_admin, :except => [:index, :show] + before_filter :require_admin_or_api_request, :only => [:index, :show] + before_filter :find_role, :only => [:show, :edit, :update, :destroy] def index respond_to do |format| @@ -35,6 +34,12 @@ class RolesController < ApplicationController end end + def show + respond_to do |format| + format.api + end + end + def new # Prefills the form with 'Non member' role permissions by default @role = Role.new(params[:role] || {:permissions => Role.non_member.permissions}) |