aboutsummaryrefslogtreecommitdiffstats
path: root/app/policies/time_table_policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/time_table_policy.rb')
-rw-r--r--app/policies/time_table_policy.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/time_table_policy.rb b/app/policies/time_table_policy.rb
index e915ede6a..a8f54ad48 100644
--- a/app/policies/time_table_policy.rb
+++ b/app/policies/time_table_policy.rb
@@ -6,6 +6,10 @@ class TimeTablePolicy < BoivPolicy
end
end
+ def actualize?
+ !archived? && organisation_match? && edit?
+ end
+
def create?
!archived? && user.has_permission?('time_tables.create') # organisation match via referential is checked in the view
end