mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Public user can create admin_session when :admin env
This commit is contained in:
parent
7f8c2bb8b9
commit
d70457eb70
1 changed files with 4 additions and 1 deletions
|
@ -10,8 +10,11 @@ class Ability
|
||||||
# public user abilites
|
# public user abilites
|
||||||
can :create, :session
|
can :create, :session
|
||||||
|
|
||||||
if (Rails.env.production? ? REGISTRY_ENV == :admin && user.admin? : user.admin?)
|
if REGISTRY_ENV == :admin
|
||||||
can :create, :admin_session
|
can :create, :admin_session
|
||||||
|
end
|
||||||
|
|
||||||
|
if (Rails.env.production? ? REGISTRY_ENV == :admin && user.admin? : user.admin?)
|
||||||
can :manage, Domain
|
can :manage, Domain
|
||||||
can :switch, :registrar
|
can :switch, :registrar
|
||||||
can :crud, DomainTransfer
|
can :crud, DomainTransfer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue