aboutsummaryrefslogtreecommitdiffstats
path: root/app/policies/calendar_policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/calendar_policy.rb')
-rw-r--r--app/policies/calendar_policy.rb6
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?