mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
17 lines
308 B
Ruby
17 lines
308 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Check the access policies for API::WalletController
|
|
class WalletPolicy < ApplicationPolicy
|
|
def by_user?
|
|
user.admin? || user.manager? || user == record.user
|
|
end
|
|
|
|
def transactions?
|
|
user.admin? || user == record.user
|
|
end
|
|
|
|
def credit?
|
|
user.admin?
|
|
end
|
|
end
|