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.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/policies/referential_policy.rb b/app/policies/referential_policy.rb
new file mode 100644
index 000000000..ddf5188a0
--- /dev/null
+++ b/app/policies/referential_policy.rb
@@ -0,0 +1,13 @@
+class ReferentialPolicy < ApplicationPolicy
+ class Scope < Scope
+ def resolve
+ scope
+ end
+ end
+
+ def update?
+ !record.archived?
+ end
+
+ def edit? ; update? end
+end