aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/policies/referential_policy.rb2
-rw-r--r--spec/policies/referential_policy_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/policies/referential_policy.rb b/app/policies/referential_policy.rb
index f5c2d7c08..22e5c4dc5 100644
--- a/app/policies/referential_policy.rb
+++ b/app/policies/referential_policy.rb
@@ -10,7 +10,7 @@ class ReferentialPolicy < ApplicationPolicy
end
def destroy?
- !referential_read_only? && organisation_match? && user.has_permission?('referentials.destroy')
+ organisation_match? && user.has_permission?('referentials.destroy')
end
def update?
diff --git a/spec/policies/referential_policy_spec.rb b/spec/policies/referential_policy_spec.rb
index 778e14901..80369c409 100644
--- a/spec/policies/referential_policy_spec.rb
+++ b/spec/policies/referential_policy_spec.rb
@@ -33,7 +33,7 @@ RSpec.describe ReferentialPolicy, type: :policy do
# ---------------------------------------
permissions :destroy? do
- it_behaves_like 'permitted policy and same organisation', 'referentials.destroy', archived_and_finalised: true
+ it_behaves_like 'permitted policy and same organisation', 'referentials.destroy'
end
permissions :edit? do
it_behaves_like 'permitted policy and same organisation', 'referentials.update', archived_and_finalised: true