1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-11 22:24:21 +01:00
fab-manager/app/policies/invoice_policy.rb

22 lines
275 B
Ruby
Raw Normal View History

2016-03-23 18:39:41 +01:00
class InvoicePolicy < ApplicationPolicy
def index?
user.admin?
2016-03-23 18:39:41 +01:00
end
def download?
user.admin? or (record.invoicing_profile.user_id == user.id)
2016-03-23 18:39:41 +01:00
end
def create?
user.admin?
2016-03-23 18:39:41 +01:00
end
def list?
user.admin?
end
2019-07-31 12:00:52 +02:00
def first?
user.admin?
end
2016-03-23 18:39:41 +01:00
end