Merge tag 'v3.4.0' into hometown-dev
This commit is contained in:
15
app/policies/delivery_policy.rb
Normal file
15
app/policies/delivery_policy.rb
Normal file
@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DeliveryPolicy < ApplicationPolicy
|
||||
def clear_delivery_errors?
|
||||
admin?
|
||||
end
|
||||
|
||||
def restart_delivery?
|
||||
admin?
|
||||
end
|
||||
|
||||
def stop_delivery?
|
||||
admin?
|
||||
end
|
||||
end
|
||||
15
app/policies/follow_recommendation_policy.rb
Normal file
15
app/policies/follow_recommendation_policy.rb
Normal file
@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class FollowRecommendationPolicy < ApplicationPolicy
|
||||
def show?
|
||||
staff?
|
||||
end
|
||||
|
||||
def suppress?
|
||||
staff?
|
||||
end
|
||||
|
||||
def unsuppress?
|
||||
staff?
|
||||
end
|
||||
end
|
||||
19
app/policies/rule_policy.rb
Normal file
19
app/policies/rule_policy.rb
Normal file
@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class RulePolicy < ApplicationPolicy
|
||||
def index?
|
||||
staff?
|
||||
end
|
||||
|
||||
def create?
|
||||
admin?
|
||||
end
|
||||
|
||||
def update?
|
||||
admin?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
admin?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user