aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/policies/time_table_combination_policy.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/policies/time_table_combination_policy.rb b/app/policies/time_table_combination_policy.rb
new file mode 100644
index 000000000..daa6808e4
--- /dev/null
+++ b/app/policies/time_table_combination_policy.rb
@@ -0,0 +1,12 @@
+class TimeTableCombinationPolicy < ApplicationPolicy
+
+ class Scope < Scope
+ def resolve
+ scope
+ end
+ end
+
+ def create?
+ !archived? && organisation_match? && user.has_permission?('time_tables.update')
+ end
+end