prevent update if template is in use

This commit is contained in:
Bilal
2020-07-13 20:01:06 +02:00
parent cefa30b331
commit f44eca5328
7 changed files with 39 additions and 6 deletions

View File

@@ -27,6 +27,10 @@ class ContractTemplatePolicy < ApplicationPolicy
create?
end
def update?
edit?
end
def import?
if user.account_manager?
record.project.account = user.account