aboutsummaryrefslogtreecommitdiffstats
path: root/app/policies
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/referential_policy.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/policies/referential_policy.rb b/app/policies/referential_policy.rb
index af5c14880..f5c2d7c08 100644
--- a/app/policies/referential_policy.rb
+++ b/app/policies/referential_policy.rb
@@ -18,7 +18,7 @@ class ReferentialPolicy < ApplicationPolicy
end
def clone?
- !referential_read_only? && create?
+ !record.in_referential_suite? && create?
end
def validate?
@@ -30,7 +30,7 @@ class ReferentialPolicy < ApplicationPolicy
end
def unarchive?
- !record.archived_at.nil? && organisation_match? && user.has_permission?('referentials.update')
+ record.archived? && !record.merged? && organisation_match? && user.has_permission?('referentials.update')
end
def common_lines?