mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
move domain upper in ability
This commit is contained in:
parent
f937822016
commit
06b65f057c
1 changed files with 8 additions and 8 deletions
|
@ -19,6 +19,14 @@ class Ability
|
|||
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
def epp
|
||||
# Epp::Domain
|
||||
can(:info, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.auth_info == pw }
|
||||
can(:check, Epp::Domain)
|
||||
can(:create, Epp::Domain)
|
||||
can(:renew, Epp::Domain)
|
||||
can(:update, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.auth_info == pw }
|
||||
can(:transfer, Epp::Domain) { |d, pw| d.auth_info == pw }
|
||||
|
||||
# Epp::Contact
|
||||
can(:info, Epp::Contact)
|
||||
can(:view_full_info, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id || c.auth_info == pw }
|
||||
|
@ -28,14 +36,6 @@ class Ability
|
|||
can(:delete, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id && c.auth_info == pw }
|
||||
can(:renew, Epp::Contact)
|
||||
can(:view_password, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id || c.auth_info == pw }
|
||||
|
||||
# Epp::Domain
|
||||
can(:info, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.auth_info == pw }
|
||||
can(:check, Epp::Domain)
|
||||
can(:create, Epp::Domain)
|
||||
can(:renew, Epp::Domain)
|
||||
can(:update, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.auth_info == pw }
|
||||
can(:transfer, Epp::Domain) { |d, pw| d.auth_info == pw }
|
||||
end
|
||||
# rubocop: enabled Metrics/CyclomaticComplexity
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue