Merge pull request #5197 from nonamethanks/fix-bur-links

BURs: don't allow edits to approved scripts
This commit is contained in:
evazion
2022-06-01 18:37:09 -05:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ class BulkUpdateRequestPolicy < ApplicationPolicy
end
def update?
unbanned? && (user.is_admin? || record.user_id == user.id)
unbanned? && !record.is_approved? && (user.is_admin? || record.user_id == user.id)
end
def approve?