Commit graph

55 commits

Author SHA1 Message Date
oleghasjanov
618f2f5aed Fix: Align domain contact duplication logic and notifications
This commit refines the contact duplication checks and notification messages for domain creation and updates, ensuring consistency and addressing a bug in domain updates.

**Key Changes:**

*   **Consistent Duplicate Contact Handling:**
    *   The `check_for_cross_role_duplicates`, `remove_duplicate_contacts`, and `duplicate_contact?` methods are now more closely aligned between `DomainCreate` and `DomainUpdate` interactors.
    *   `DomainUpdate` now correctly uses `admin_contact_ids=` and `tech_contact_ids=` to assign filtered contacts. This resolves a `PG::UniqueViolation` error that occurred when trying to re-associate existing contacts using `_attributes=` methods.
    *   The `duplicate_contact?` method in `DomainCreate` was updated to match `DomainUpdate`, primarily checking for semantic duplicates based on attributes (name, ident, email, phone) rather than also including a `contact.code` check, which is more suitable for cross-role duplication.

*   **Standardized Notification Messages:**
    *   The `notify_about_removed_duplicates` method in both interactors now generates a more concise message: ". [Role] contact [CODE] was discarded as duplicate;" for each discarded contact.
    *   This message is appended to `domain.skipped_domain_contacts_validation`.

*   **EPP & REPP Response Updates:**
    *   The `message` method in `Repp::V1::DomainsController` now correctly appends `domain.skipped_domain_contacts_validation` to the "Command completed successfully" message, ensuring it appears in REPP JSON responses for both create and update.
    *   The EPP XML views (`app/views/epp/domains/create.xml.builder` and `app/views/epp/domains/success.xml.builder`) are updated to dynamically include `domain.skipped_domain_contacts_validation` in the `<msg>` tag.

*   **Model Attribute:**
    *   Added `skipped_domain_contacts_validation` as a string attribute to the `Domain` model to store these notification messages.

*   **Test Refinements (Implicit):**
    *   The related test suite for domain updates (`test/integration/epp/domain/base_test.rb`) was being updated to reflect these logic changes and assert the correct notification messages.

These changes improve the robustness and consistency of contact management during domain operations, providing clearer feedback to users about discarded duplicate contacts.
2025-07-31 14:03:29 +03:00
olegphenomenon
b7901ba62d fixed period param 2023-04-13 12:05:50 +03:00
Thiago Youssef
2a58bf3849 Add rate limiting to all repp actions 2022-10-28 14:00:18 +03:00
Sergei Tsõganov
fb2fe285f1 Removed 200 limit of records if nil 2022-09-16 10:57:52 +03:00
Sergei Tsõganov
931e3907cd Fixed domains search by registrant 2022-08-22 09:20:57 +03:00
Sergei Tsõganov
ee1117021b Enabled partial search 2022-07-14 15:48:38 +03:00
Sergei Tsõganov
26cb791586 Fixes after repp-apidoc update 2022-07-12 15:48:43 +03:00
Sergei Tsõganov
7c570e2916 Fixed codeclimate errors 2022-07-12 15:48:42 +03:00
Sergei Tsõganov
a5ffce290d Updated REPP API for new registrar portal 2022-07-12 15:47:25 +03:00
Oleg Hasjanov
5a19149129 added ip to white list 2021-11-08 12:16:58 +02:00
dinsmol
f4e0084895 fixed codeclimate errors (partically) 2021-09-09 09:19:09 +03:00
Alex Sherman
11d97358c1 Fix CC issues 2021-05-06 12:17:19 +05:00
Alex Sherman
991d2d252c Fixed repp domain transfer 2021-05-06 12:15:15 +05:00
Alex Sherman
79351d50d9 Add epp errors support to bulk renew 2021-05-06 12:15:15 +05:00
Alex Sherman
c613de1a11 Refactor epp error due to Rails 6.1 changes 2021-05-06 12:14:35 +05:00
Karl Erik Õunapuu
546330b178
REPP: Add renew exp_date sanity check 2021-03-23 13:14:31 +02:00
Karl Erik Õunapuu
016c5e802c
REPP: Domain info for not-sponsoring registrars 2021-03-23 12:04:03 +02:00
Karl Erik Õunapuu
117b682990
Rename auth_info / authorization_code to transfer_code 2021-03-22 16:29:40 +02:00
Karl Erik Õunapuu
6e624a7898
FIX code styling 2021-03-22 15:33:37 +02:00
Karl Erik Õunapuu
d6b266459b
REPP: Ditch _id from registrant / registrar attributes 2021-03-22 15:28:23 +02:00
Karl Erik Õunapuu
83bfc493bb
Rename admin_domain_contacts_attributes to admin_contacts 2021-03-22 15:13:48 +02:00
Alex Sherman
fdef27c45e
Mode all the actions to Interactions folder 2021-02-08 15:13:22 +02:00
Karl Erik Õunapuu
d7f01f24a2
Move actions to own namespace 2021-02-08 14:12:55 +02:00
Karl Erik Õunapuu
312f199504
REPP: Forward Registrar ID for domain update action 2021-02-05 12:53:51 +02:00
Karl Erik Õunapuu
24c3962517
REPP: Domain delete test 2021-02-02 11:55:09 +02:00
Karl Erik Õunapuu
1461d2a566
REPP: Domain registrant change test 2021-02-02 11:26:52 +02:00
Karl Erik Õunapuu
c5e2ebe15e
Fix BL after master emrge 2021-01-29 15:36:23 +02:00
Karl Erik Õunapuu
43e5b74668
Merge remote-tracking branch 'origin/master' into repp-domains 2021-01-29 13:35:34 +02:00
Karl Erik Õunapuu
7c35083a8b
Fix some CC issues 2021-01-28 12:43:43 +02:00
Karl Erik Õunapuu
d1cd0867c8
Fix some CC issues 2021-01-27 15:55:37 +02:00
Karl Erik Õunapuu
2ca9697b46
Remove redundant methods 2021-01-27 13:31:30 +02:00
Karl Erik Õunapuu
e55fc833e7
REPP: Serialize domains 2021-01-27 13:03:54 +02:00
Karl Erik Õunapuu
cdf2866434
REPP: Domain Delete endpoint, port EPP Delete to Actions 2021-01-26 16:08:51 +02:00
Karl Erik Õunapuu
99a1f1f489
REPP: Read/Ack poll messages 2021-01-22 16:23:48 +02:00
Karl Erik Õunapuu
06088e33c5
REPP: Specific domain transfer action 2021-01-22 12:54:20 +02:00
Karl Erik Õunapuu
454433cf10
REPP: Update ApiDoc 2021-01-21 11:29:00 +02:00
Karl Erik Õunapuu
9dcd40ee3b
REPP domains: Modify DNSSEC keys 2021-01-18 16:36:07 +02:00
Karl Erik Õunapuu
2b3634b048
REPP domains: Nameserver actions 2021-01-18 13:24:16 +02:00
Karl Erik Õunapuu
58d2bdb775
Accept puny-coded domain for polling Transfer Info 2021-01-14 11:15:07 +02:00
Karl Erik Õunapuu
fcb97df45d
REPP: Fix domain create success response 2021-01-11 16:25:56 +02:00
Karl Erik Õunapuu
e2ff5d4506
REPP: Add Domain Create endpoint 2021-01-11 15:57:23 +02:00
Karl Erik Õunapuu
c58b4fb2e9
Hash: select entries by keys 2021-01-11 14:32:10 +02:00
Karl Erik Õunapuu
7459d7e0c5
Nameserver deserializer 2020-11-26 11:27:54 +02:00
Karl Erik Õunapuu
f2983da14c
REPP: Fix CC issues 2020-10-22 15:41:47 +03:00
Karl Erik Õunapuu
03d940a695
REPP: Fix bulk domain transfer 2020-10-22 15:25:02 +03:00
Karl Erik Õunapuu
06ad8c8c77
REPP: Domain tech contact replace test 2020-10-21 15:21:54 +03:00
Karl Erik Õunapuu
774ada6ebb
REPP: Domain transfer test 2020-10-21 14:00:16 +03:00
Karl Erik Õunapuu
9a36b0403c
REPP: Domain transfer info test 2020-10-21 13:10:28 +03:00
Karl Erik Õunapuu
220e0d7993
Fix tests 2020-10-19 10:24:56 +03:00
Karl Erik Õunapuu
a6f7af0f03
Fix tests 2020-10-16 12:04:55 +03:00