Merge remote-tracking branch 'parent/main' into kb_migration
This commit is contained in:
commit
979292d950
56 changed files with 774 additions and 277 deletions
|
@ -12,7 +12,7 @@ class Admin::StatusPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def show?
|
||||
role.can?(:manage_reports, :manage_users) && (record.public_visibility? || record.unlisted_visibility? || record.public_unlisted_visibility? || record.reported?)
|
||||
role.can?(:manage_reports, :manage_users) && (record.public_visibility? || record.unlisted_visibility? || record.public_unlisted_visibility? || record.reported? || viewable_through_normal_policy?)
|
||||
end
|
||||
|
||||
def destroy?
|
||||
|
@ -26,4 +26,10 @@ class Admin::StatusPolicy < ApplicationPolicy
|
|||
def review?
|
||||
role.can?(:manage_taxonomies)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def viewable_through_normal_policy?
|
||||
StatusPolicy.new(current_account, record, @preloaded_relations).show?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue