mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 01:36:02 +02:00
contact info should always return something
This commit is contained in:
parent
876cd6e222
commit
e11607cdc4
3 changed files with 33 additions and 16 deletions
|
@ -16,15 +16,17 @@ class Ability
|
|||
can :show, :dashboard
|
||||
end
|
||||
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
def epp
|
||||
# Epp::Contact
|
||||
can(:info, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id || c.auth_info == pw }
|
||||
can(:info, Epp::Contact)
|
||||
can(:view_full_info, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id || c.auth_info == pw }
|
||||
can(:check, Epp::Contact)
|
||||
can(:create, Epp::Contact)
|
||||
can(:update, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id && c.auth_info == pw }
|
||||
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| c.registrar_id == @user.registrar_id }
|
||||
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 }
|
||||
|
@ -34,6 +36,7 @@ class Ability
|
|||
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
|
||||
|
||||
def user
|
||||
can :show, :dashboard
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue