Commit graph

1860 commits

Author SHA1 Message Date
oleghasjanov
a11c0fca2d fix: handle HTTPClient::KeepAliveDisconnected in OrgRegistrantPhoneCheckerJob
This commit implements a reliable connection error handling solution for the
Company Register API integration. The job previously failed when connection
errors occurred without proper recovery mechanisms.
The implementation:
Adds a lightweight Retryable module with configurable retry logic
Implements smart caching of API responses (1 day expiration)
Handles common network errors like KeepAliveDisconnected and timeouts
Provides a fallback mechanism when all retry attempts fail
Ensures test reliability with cache-skipping in test environment
Testing:
Added specific tests for both recovery and fallback scenarios
Verified cache behavior in production and test environments
Resolves connection errors observed in production logs without adding
unnecessary complexity to the codebase.
2025-03-06 11:38:09 +02:00
Timo Võhmar
5b1a5a6d06
Merge pull request #2755 from internetee/upgrade-registrar-invalid-company-notification
Refactor force delete notifications and improve status handling
2025-02-20 10:11:17 +02:00
Timo Võhmar
98bf7fb594
Merge pull request #2751 from internetee/2742-clienthold-status-must-not-me-reset-unless-the-forcedelete-status-is-reset
fix: prevent client_hold status from returning after manual removal
2025-02-19 15:38:17 +02:00
oleghasjanov
cdf301bc0e updated test 2025-02-17 13:16:14 +02:00
Timo Võhmar
38dc5466e9
Merge pull request #2723 from internetee/company-validator-during-creation
feat: restore company validation for Estonian organizations
2025-02-12 10:33:28 +02:00
oleghasjanov
6194c5c58a fix: prevent client_hold status from returning after manual removal
- Add flag in force_delete_data to track manual client_hold removal
- Update ProcessClientHold to respect manual status removal
- Add test to verify client_hold doesn't return after admin removes it

When an admin manually removes the client_hold status from a domain,
it should not be automatically re-added by the ProcessClientHold job.
This change tracks manual removals and prevents the status from being
re-added while maintaining the force delete process.
2025-02-10 13:42:19 +02:00
oleghasjanov
a56237c84f fix: update admin contact validation error code
- Change error code from 2004 to 2306 for admin contact validation
- Add explicit validation check for required admin contacts
- Update tests to expect new error code

The error code 2306 better reflects the EPP standard for policy-based
validation failures. This change makes the error handling more consistent
with EPP specifications when validating admin contact requirements.
2025-02-05 10:54:21 +02:00
oleghasjanov
6d657426e5 remove test 2025-02-03 14:08:50 +02:00
oleghasjanov
7392ce2d76 refactor: Extract company status handling logic
- Move company status handling logic into a separate method `handle_company_statuses`
- Improve code readability by splitting proceed_company_status method
- Keep status update logic after handling company statuses
2025-02-03 14:08:50 +02:00
oleghasjanov
19df0cd57f fix tests -> count of running jobs were decreased 2025-02-03 14:08:50 +02:00
oleghasjanov
2ec545b3aa feat: add status notes to force delete notifications
- Add notes parameter to force delete interactions to provide more context
- Include company registry status in force delete notifications
- Add status mapping constants for better readability
- Move status note assignment before save in force delete process

Technical details:
- Add notes field to Domains::ForceDelete::Base interaction
- Update force delete notifications to include status notes
- Add REGISTRY_STATUSES mapping in CompanyRegisterStatusJob
- Update tests to verify new notification format
2025-02-03 14:08:50 +02:00
oleghasjanov
89097bfabe feat: restore company validation for Estonian organizations
- Re-enable company validation logic for Estonian organization contacts
- Update company_register gem to use master branch
- Restore and update company validation tests
- Add additional check for Estonian country code in validation

This change ensures that only registered or liquidated Estonian companies
can be used when creating organizational contacts.
2025-02-03 14:08:18 +02:00
oleghasjanov
f2978599b4 feat: add admin contact ident type validation
- Add new setting for allowed admin contact ident types
- Add validation for admin contact ident types on domain create/update
- Add UI controls for managing allowed ident types
- Add tests for new validation rules
- Update domain model to respect new settings

The changes allow configuring which identification types (private person,
organization, birthday) are allowed for administrative contacts. This is
enforced when creating new domains or adding new admin contacts.
2025-02-03 13:59:03 +02:00
Timo Võhmar
268b942042
Merge pull request #2741 from internetee/disclose-phone-num-for-org-registrants
Update company_register gem and fix logger dependency
2025-01-31 17:52:57 +02:00
Timo Võhmar
3289851340
Merge pull request #2740 from internetee/add-birthdate-verification
Added birthday ident verification
2025-01-31 17:50:55 +02:00
oleghasjanov
cd5de3bd14 commit
feat: make technical contacts optional for all domains

- Remove automatic tech contact assignment from admin contacts
- Set minimum tech contacts to 0 for all registrant types
- Update tests to reflect optional tech contacts
- Keep max tech contacts limit from settings

This change implements the requirement to make technical contacts optional
for all domain types while maintaining the maximum limit from settings.
Previously tech contacts were required for organizations and automatically
copied from admin contacts.
2025-01-31 15:49:35 +02:00
oleghasjanov
863dcce647 Add admin contact validation rules based on registrant type and age
- Add validation requiring admin contacts for legal entity registrants
- Add validation requiring admin contacts for underage private registrants:
  - Under 18 years old for birthday-based identification
  - Under 18 years old for Estonian ID numbers
- Make admin contacts optional for:
  - Adult private registrants (18+ years)
  - Adult Estonian ID holders
  - Non-Estonian private registrants
- Add tests covering all new validation scenarios
- Add helper methods to calculate age and parse Estonian ID birth dates
2025-01-31 12:49:14 +02:00
tsoganov
c87c86ac9b Corrected tests 2025-01-31 12:49:14 +02:00
oleghasjanov
803276d8c8 Add phone number validation for Estonian organization contacts
- Add OrgRegistrantPhoneCheckerJob execution for contact creation and update
- Rename validate_* methods to maybe_validate_* for consistency
- Add tests for phone number validation in REPP API
- Fix method naming and add proper job arguments

This ensures phone numbers are validated against company register data
for Estonian organization contacts after creation or update.
2025-01-30 12:49:20 +02:00
oleghasjanov
429e2644d6 Fix registrant user lookup in phone checker job
- Replace RegistrantUser.find_by with Contact model query
- Add proper scoping for organization contacts from Estonia
- Include join with registrant domains

This ensures consistent contact lookup between bulk and single checker methods
2025-01-30 10:57:45 +02:00
tsoganov
9f81402d64 Corrected integration test 2025-01-28 10:43:59 +02:00
Timo Võhmar
a9b341ebfe
Merge pull request #2730 from internetee/2702-optional-admin-contact-for-private-registrations
Make admin contacts optional for private registrants
2025-01-28 10:15:33 +02:00
tsoganov
8b872b4a14 Corrected test 2025-01-27 16:43:19 +02:00
Timo Võhmar
8dcc287d60
Merge pull request #2737 from internetee/improve-verification-translations
Improved verification email translations
2025-01-15 16:45:44 +02:00
tsoganov
5cf18bd9e5 Corrected tests 2025-01-14 15:52:33 +02:00
oleghasjanov
3c169bb00b Make admin contacts optional for private registrants
This change makes admin contacts optional for private registrants while keeping them mandatory for organizations. The changes include:

- Updated Domain model validations to make admin and tech contacts optional (min=0) for private registrants
- Added validation rules methods to handle different requirements based on registrant type
- Modified EPP domain creation to support domains without admin contacts for private registrants
- Updated attach_default_contacts to skip adding contacts for private registrants
- Added comprehensive test coverage for:
  - Domain model validations with private/org registrants
  - EPP domain creation without admin contacts for private registrants
  - REPP API contact management for private registrants

This implements the requirement to make admin contacts optional for private registrations of .ee domains while maintaining the existing validation rules for organizations.
2025-01-07 12:24:57 +02:00
Timo Võhmar
e38c46757b
Merge pull request #2718 from internetee/daily-fd-domains-subscription
Daily email notification to admins about new FD statuses
2024-12-31 10:56:52 +02:00
oleghasjanov
4b52284a86 Remove debug output from force delete process
WHAT:
- Removed debug output line from PostSetProcess
- Fixed force_delete_start date comparison in admin notifier job

WHY:
- Debug output was adding noise to logs and wasn't necessary

HOW:
- Removed puts statement for domain status debugging
- Changed query to use exact timestamp comparison for force_delete_start
2024-12-19 14:27:47 +02:00
oleghasjanov
6facbc8302 updated poll message 2024-12-19 11:15:23 +02:00
oleghasjanov
b229613b8a feat: Add invalid ident notification for company register status checks
- Add notification system for invalid company identifications
- Update force delete notifications to handle invalid company cases
- Add translations for invalid ident messages (ET/EN)
- Add test coverage for invalid ident scenarios
- Remove debug logging from force delete process
- Clean up unused CSV templates

This change improves handling of invalid company identifications in the
Estonian business registry by providing proper notifications to registrars
and ensuring appropriate status updates.
2024-12-17 14:08:57 +02:00
oleghasjanov
d0a39bf469 remove company creation validation 2024-11-25 14:48:28 +02:00
Timo Võhmar
5d454febb3
Merge pull request #2696 from internetee/verify-contacts
Handling contact verifications
2024-11-19 10:34:53 +02:00
oleghasjanov
35eb60a5d8 removed extra line 2024-11-14 10:16:24 +02:00
oleghasjanov
da17294836 feat: add company register status job tests
- Add test for checking companies with status K (DELETED) that should be scheduled for force delete
- Add test for checking companies that are not found in register and should be deleted
- Add company_details method to CompanyRegisterClientStub for mocking API responses

The tests verify that:
1. Companies with DELETED status are properly marked for force delete
2. Companies not found in register are marked as deleted and scheduled for force delete
3. Proper mocking of company_details API responses
2024-11-14 10:13:01 +02:00
tsoganov
af46be8d0f Corrected tests 2024-11-14 08:37:09 +02:00
tsoganov
0085f99e02 Modified identification request webhook 2024-11-14 08:37:09 +02:00
tsoganov
637cabf95f Handling contact verifications 2024-11-14 08:37:09 +02:00
oleghasjanov
292a4fddc5 fixed tests: updated gems; improve company register status job and test stability
- Refactor CompanyRegisterStatusJob for better readability and error handling
- Update whitelisted_companies to use JSON parsing with fallback
- Fix company register status check in tests with proper mock data
- Remove debug logging statements
- Add null check for domain status notes
- Update test dependencies (Capybara and Selenium) for better stability
2024-11-13 15:04:39 +02:00
oleghasjanov
61497deb2a added more tests 2024-11-08 12:45:12 +02:00
oleghasjanov
6ff5e55a24 business contact validation + tests 2024-11-08 12:45:12 +02:00
Timo Võhmar
6c9ce3a7a1
Merge pull request #2647 from internetee/change-count-of-validation-contacts
changed count of contact validations
2024-09-04 16:19:35 +03:00
tsoganov
c7d3788a36 Updated contact name data type in schemas 2024-08-22 11:25:54 +03:00
Oleg Hasjanov
34c14e5bef changed count of contact validations 2024-02-08 15:00:41 +02:00
Timo Võhmar
d47b3f233e
Merge pull request #2625 from internetee/reference-data-get-update
updated request for get reference user data
2024-02-06 15:26:31 +02:00
Oleg Hasjanov
8eee65579b move validator from callback to action interactor and to the api controller 2024-02-02 09:08:04 +02:00
Oleg Hasjanov
f4d276fc44 comment out not relevant tests 2024-02-02 09:08:04 +02:00
Oleg Hasjanov
736d935e3e added test 2024-02-02 09:08:04 +02:00
Oleg Hasjanov
b5b59026b9 added deadline registration condition during domain registration from auction 2024-01-24 15:17:11 +02:00
Sergei Tsoganov
31fac9eadf Fixed fixture 2023-12-21 17:35:38 +02:00
Sergei Tsoganov
c67a21c7ba Improved stats query 2023-12-21 17:26:01 +02:00