Merge remote-tracking branch 'parent/main' into upstream-2024112

This commit is contained in:
KMY 2024-11-28 19:45:31 +09:00
commit 3359008684
71 changed files with 1505 additions and 2295 deletions

View file

@ -147,6 +147,10 @@ class UserRole < ApplicationRecord
other_role.nil? || position > other_role.position
end
def bypass_block?(role)
overrides?(role) && highlighted? && can?(*Flags::CATEGORIES[:moderation])
end
def computed_permissions
# If called on the everyone role, no further computation needed
return permissions if everyone?