Fixes GHSA-62j4-hvj7-px3f

This commit is contained in:
Juan Hernández Babón authored and Claire committed 2026-09-01 14:33:35 +02:00
1 parent d8e613a35c
commit 63eae9292e
34 files changed
+134

No files matched your search

@@ -0,0 +1,16 @@
# frozen_string_literal: true
module Admin::PermissionsConcern
extend ActiveSupport::Concern
included do
before_action :require_moderator_or_admin_permissions
end
private
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