diff options
| author | Alban Peignier | 2018-01-10 21:34:47 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-10 21:34:47 +0100 |
| commit | cd14af8a507eb927f5e10675c3069a820f99fb9c (patch) | |
| tree | c64edd02cd025c7847e1c1e301b83f58c59f3414 /app/policies/time_table_policy.rb | |
| parent | 17a3d2437a4eb60ec4046137fb37d7b433dc48aa (diff) | |
| parent | 5ab41aaf9978abe89faf3c11dafa8c3c372f7cfb (diff) | |
| download | chouette-core-cd14af8a507eb927f5e10675c3069a820f99fb9c.tar.bz2 | |
Merge pull request #204 from af83/5413-read_only_policy_for_finalised_refs
Read only policy for referentials in suite. Refs #5413
Diffstat (limited to 'app/policies/time_table_policy.rb')
| -rw-r--r-- | app/policies/time_table_policy.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/policies/time_table_policy.rb b/app/policies/time_table_policy.rb index 92d3aef3e..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? && organisation_match? && user.has_permission?('time_tables.create') + !referential_read_only? && organisation_match? && user.has_permission?('time_tables.create') end def destroy? - !archived? && organisation_match? && user.has_permission?('time_tables.destroy') + !referential_read_only? && organisation_match? && user.has_permission?('time_tables.destroy') end def update? - !archived? && organisation_match? && user.has_permission?('time_tables.update') + !referential_read_only? && organisation_match? && user.has_permission?('time_tables.update') end def actualize? - !archived? && organisation_match? && edit? + !referential_read_only? && organisation_match? && edit? end def duplicate? - !archived? && organisation_match? && create? + !referential_read_only? && organisation_match? && create? end def month? |
