diff options
Diffstat (limited to 'app/policies/calendar_policy.rb')
| -rw-r--r-- | app/policies/calendar_policy.rb | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/app/policies/calendar_policy.rb b/app/policies/calendar_policy.rb index 4248bccc7..927a985b3 100644 --- a/app/policies/calendar_policy.rb +++ b/app/policies/calendar_policy.rb @@ -5,23 +5,18 @@ class CalendarPolicy < ApplicationPolicy end end - def show? - organisation_match? || record.shared + def create? + organisation_match? + end + def destroy? + organisation_match? + end + def update? + organisation_match? end - - def new? ; modify? end - def create? ; new? end - - def edit? ; modify? end - def update? ; edit? end - - def destroy? ; modify? end def share? user.organisation.name == 'STIF' # FIXME end - def modify? - organisation_match? - end end |
