mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Refactor user to admin and api user
This commit is contained in:
parent
f3215680d5
commit
037cb57e00
34 changed files with 551 additions and 551 deletions
|
@ -4,7 +4,7 @@ class Ability
|
|||
def initialize(user)
|
||||
alias_action :create, :read, :update, :destroy, to: :crud
|
||||
|
||||
@user = user || User.new
|
||||
@user = user || AdminUser.new
|
||||
@user.roles.each { |role| send(role) } if @user.roles
|
||||
|
||||
return if @user.roles || @user.roles.any?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue