mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 10:19:45 +02:00
Contact info request should return smaal contact info when pw is blank
This commit is contained in:
parent
6f9660d413
commit
a994767330
2 changed files with 19 additions and 3 deletions
|
@ -19,6 +19,7 @@ class Ability
|
|||
|
||||
# rubocop: disable Metrics/CyclomaticComplexity
|
||||
# rubocop: disable Metrics/PerceivedComplexity
|
||||
# rubocop: disable Metrics/LineLength
|
||||
def epp
|
||||
# Epp::Domain
|
||||
can(:info, Epp::Domain) { |d, pw| d.registrar_id == @user.registrar_id || d.auth_info == pw }
|
||||
|
@ -29,7 +30,7 @@ class Ability
|
|||
can(:transfer, Epp::Domain) { |d, pw| d.auth_info == pw }
|
||||
|
||||
# Epp::Contact
|
||||
can(:info, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id || c.auth_info == pw }
|
||||
can(:info, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id || pw.blank? ? true : c.auth_info == pw }
|
||||
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)
|
||||
|
@ -38,6 +39,7 @@ class Ability
|
|||
can(:renew, Epp::Contact)
|
||||
can(:view_password, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id || c.auth_info == pw }
|
||||
end
|
||||
# rubocop: enable Metrics/LineLength
|
||||
# rubocop: enable Metrics/CyclomaticComplexity
|
||||
# rubocop: enable Metrics/PerceivedComplexity
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue