Simplify case for permission finder

pull/32516/head
Matt Jankowski 2024-10-12 17:03:26 -04:00
parent 21ff5e9656
commit bca7d9302b
1 changed files with 3 additions and 3 deletions

View File

@ -58,11 +58,11 @@ class Webhook < ApplicationRecord
def self.permission_for_event(event)
case event
when 'account.approved', 'account.created', 'account.updated'
when /account/
:manage_users
when 'report.created', 'report.updated'
when /report/
:manage_reports
when 'status.created', 'status.updated'
when /status/
:view_devops
end
end