aboutsummaryrefslogtreecommitdiffstats
path: root/app/policies/referential_policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/referential_policy.rb')
-rw-r--r--app/policies/referential_policy.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/policies/referential_policy.rb b/app/policies/referential_policy.rb
index ddf5188a0..074aaec8b 100644
--- a/app/policies/referential_policy.rb
+++ b/app/policies/referential_policy.rb
@@ -5,9 +5,20 @@ class ReferentialPolicy < ApplicationPolicy
end
end
+ def create?
+ true
+ end
+
+ def edit?
+ organisation_match?
+ end
+
def update?
- !record.archived?
+ edit? && !record.archived?
end
- def edit? ; update? end
+ def new? ; create? end
+ def destroy? ; edit? end
end
+
+