Fixes GHSA-62j4-hvj7-px3f
This commit is contained in:
1 parent
d52d6e62c3
commit
bd3a357e08
34 files changed
+134
-6
No files matched your search
@@ -4,10 +4,10 @@ module Admin
|
||||
class BaseController < ApplicationController
|
||||
include Authorization
|
||||
include AccountableConcern
|
||||
include Admin::PermissionsConcern
|
||||
|
||||
layout 'admin'
|
||||
|
||||
before_action :require_moderator_or_admin_permissions
|
||||
before_action :set_referrer_policy_header
|
||||
|
||||
after_action :verify_authorized
|
||||
@@ -21,10 +21,5 @@ module Admin
|
||||
def set_user
|
||||
@user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound)
|
||||
end
|
||||
|
||||
def require_moderator_or_admin_permissions
|
||||
# not using #authorize here, so #verify_authorized still makes sure more fine-grained rules are enforced down the line
|
||||
forbidden unless Admin::BasePolicy.new(current_account, :base).access?
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user