1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-06 21:46:17 +01:00
fab-manager/app/policies/invoice_policy.rb

18 lines
221 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.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
2016-03-23 18:39:41 +01:00
end