mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
22 lines
275 B
Ruby
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
|