Merge commit 'bc19d30b90403d9d058da301bcd7fafcc03fbf92' into glitch-soc/stable-4.7

This commit is contained in:
Claire committed 2026-09-01 16:04:38 +02:00
commit 67c079e0bf
49 files changed
+312 -118

No files matched your search

+1 -6
View File
@@ -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