Login using api user

This commit is contained in:
Martin Lensment 2015-03-20 18:11:37 +02:00
parent 99850c3acb
commit f34bca591e
3 changed files with 19 additions and 1 deletions

View file

@ -11,6 +11,7 @@ class Ability
@user.roles.each { |role| send(role) } if @user.roles
when 'ApiUser'
epp
registrar
end
can :show, :dashboard
@ -38,6 +39,10 @@ class Ability
end
# rubocop: enabled Metrics/CyclomaticComplexity
def registrar
can :manage, Invoice
end
def user
can :show, :dashboard
can :manage, Invoice