mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-11 22:24:21 +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
|