tab/app/models/client_ability.rb
2017-01-23 16:59:04 +01:00

10 lines
233 B
Ruby

class ClientAbility
include CanCan::Ability
def initialize(client)
client ||= Client.new # guest user (not logged in)
can :create, Transaction if client.has_role? :create_transactions
can :create, Request
end
end