diff --git a/app/controllers/community_controller.rb b/app/controllers/community_controller.rb index 2571ddb8d..e96eb6bef 100644 --- a/app/controllers/community_controller.rb +++ b/app/controllers/community_controller.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class CommunityController < ApplicationController before_action :normalize_params, only: :index - authorize_resource :user, parent: false def index @filters = { diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index d9f6453d1..6273deb75 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -4,7 +4,7 @@ class TeamsController < ApplicationController before_action :set_users, only: [:new, :edit] before_action :set_display_roles, only: :index - authorize_resource except: [:index, :show] + load_and_authorize_resource except: [:index, :show] def index direction = params[:direction] == 'asc' ? 'ASC' : 'DESC'