aboutsummaryrefslogtreecommitdiffstats
path: root/app/policies/time_table_policy.rb
diff options
context:
space:
mode:
authorRobert2018-01-09 12:24:23 +0100
committerRobert2018-01-09 12:24:36 +0100
commit0e91d206fd8278d0c43c34777f4a585481882b70 (patch)
tree9ef641b3455de5d6da2c22ffb702661e4e69ff8d /app/policies/time_table_policy.rb
parent7ea0a6079017c561aa8286198bd77b258cb2d240 (diff)
downloadchouette-core-0e91d206fd8278d0c43c34777f4a585481882b70.tar.bz2
Refs: #5413@0.5h; Refactoring of #archived_or_finalised?
Diffstat (limited to 'app/policies/time_table_policy.rb')
-rw-r--r--app/policies/time_table_policy.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/policies/time_table_policy.rb b/app/policies/time_table_policy.rb
index 1f5a7a259..390c170c7 100644
--- a/app/policies/time_table_policy.rb
+++ b/app/policies/time_table_policy.rb
@@ -7,23 +7,23 @@ class TimeTablePolicy < ApplicationPolicy
end
def create?
- !archived_or_finalised? && organisation_match? && user.has_permission?('time_tables.create')
+ !referential_read_only? && organisation_match? && user.has_permission?('time_tables.create')
end
def destroy?
- !archived_or_finalised? && organisation_match? && user.has_permission?('time_tables.destroy')
+ !referential_read_only? && organisation_match? && user.has_permission?('time_tables.destroy')
end
def update?
- !archived_or_finalised? && organisation_match? && user.has_permission?('time_tables.update')
+ !referential_read_only? && organisation_match? && user.has_permission?('time_tables.update')
end
def actualize?
- !archived_or_finalised? && organisation_match? && edit?
+ !referential_read_only? && organisation_match? && edit?
end
def duplicate?
- !archived_or_finalised? && organisation_match? && create?
+ !referential_read_only? && organisation_match? && create?
end
def month?