2016-03-23 18:39:41 +01:00
|
|
|
class SubscriptionPolicy < ApplicationPolicy
|
|
|
|
def show?
|
2019-01-14 12:57:31 +01:00
|
|
|
user.admin? or record.user_id == user.id
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def update?
|
2019-01-14 12:57:31 +01:00
|
|
|
user.admin?
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|
|
|
|
end
|