Merge commit '6268188543
' into kb_migration
This commit is contained in:
commit
850c4dfb3c
133 changed files with 1644 additions and 947 deletions
|
@ -14,7 +14,7 @@ class WebhookPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def update?
|
||||
role.can?(:manage_webhooks)
|
||||
role.can?(:manage_webhooks) && record.required_permissions.all? { |permission| role.can?(permission) }
|
||||
end
|
||||
|
||||
def enable?
|
||||
|
@ -30,6 +30,6 @@ class WebhookPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def destroy?
|
||||
role.can?(:manage_webhooks)
|
||||
role.can?(:manage_webhooks) && record.required_permissions.all? { |permission| role.can?(permission) }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue