diff options
| author | Robert | 2017-07-06 11:40:03 +0200 |
|---|---|---|
| committer | Robert | 2017-07-06 11:44:46 +0200 |
| commit | 1b5b681603f629b901deabffc4c55f654bbcfe14 (patch) | |
| tree | 981e874bcc11a39285b456c19a983d007f86cef9 /app/policies/calendar_policy.rb | |
| parent | b09994a4ee79f735f9b3f43535c6d138c4b68a56 (diff) | |
| download | chouette-core-1b5b681603f629b901deabffc4c55f654bbcfe14.tar.bz2 | |
Fixes: #3478@1.5h
- Fixes remaining issues with LinePolicy, CalenderPolicy & RoutePolicy
- Dead Code elimination
Diffstat (limited to 'app/policies/calendar_policy.rb')
| -rw-r--r-- | app/policies/calendar_policy.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/policies/calendar_policy.rb b/app/policies/calendar_policy.rb index 3353988bd..d3c715d70 100644 --- a/app/policies/calendar_policy.rb +++ b/app/policies/calendar_policy.rb @@ -6,13 +6,13 @@ class CalendarPolicy < ApplicationPolicy end def create? - !archived? && organisation_match? + !archived? && organisation_match? && user.has_permission?('calendars.create') end def destroy? - !archived? && organisation_match? + !archived? && organisation_match? && user.has_permission?('calendars.destroy') end def update? - !archived? && organisation_match? + !archived? && organisation_match? && user.has_permission?('calendars.update') end def share? |
