2016-07-18 18:16:54 +02:00
|
|
|
class WalletPolicy < ApplicationPolicy
|
|
|
|
def by_user?
|
|
|
|
user.is_admin?
|
|
|
|
end
|
2016-07-05 13:20:25 +02:00
|
|
|
|
|
|
|
def transactions?
|
|
|
|
user.is_admin? or user == record.user
|
|
|
|
end
|
2016-07-05 19:07:50 +02:00
|
|
|
|
|
|
|
def credit?
|
|
|
|
user.is_admin?
|
|
|
|
end
|
2016-07-18 18:16:54 +02:00
|
|
|
end
|