1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/policies/invoice_policy.rb
2019-09-12 12:53:56 +02:00

22 lines
275 B
Ruby

class InvoicePolicy < ApplicationPolicy
def index?
user.admin?
end
def download?
user.admin? or (record.invoicing_profile.user_id == user.id)
end
def create?
user.admin?
end
def list?
user.admin?
end
def first?
user.admin?
end
end