mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Merge updates and fixes
This commit is contained in:
parent
96d1c60dd8
commit
2e47bcf5cb
4 changed files with 9 additions and 11 deletions
|
@ -5,7 +5,13 @@ class Ability
|
|||
alias_action :show, :create, :update, :destroy, to: :crud
|
||||
|
||||
@user = user || AdminUser.new
|
||||
@user.roles.each { |role| send(role) } if @user.roles
|
||||
|
||||
case @user.class.to_s
|
||||
when 'AdminUser'
|
||||
@user.roles.each { |role| send(role) } if @user.roles
|
||||
when 'ApiUser'
|
||||
epp
|
||||
end
|
||||
|
||||
can :show, :dashboard
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue