Skip to content

release: v3.5.0 – staging → master#902

Merged
nevil-mathew merged 30 commits into
masterfrom
staging
Jul 17, 2026
Merged

release: v3.5.0 – staging → master#902
nevil-mathew merged 30 commits into
masterfrom
staging

Conversation

@nevil-mathew

@nevil-mathew nevil-mathew commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added tenant authentication configuration for allowed login methods and automatic registration.
    • Enabled account access using email, phone number, or username.
    • Added username-based OTP registration and purpose-specific OTP handling.
    • Tenant configuration is now included in tenant details and creation workflows.
  • Bug Fixes
    • Improved username generation when names are missing or unavailable.
    • Relaxed account registration and login requirements to support passwordless or OTP-based flows.
    • Improved validation for tenant configuration, authentication credentials, and optional profile fields.
  • Migration
    • Added support for safely moving tenant and organization data between environments.

nevil-mathew and others added 30 commits March 10, 2026 19:38
fix: update CircleCI configuration to use the latest Ubuntu image
Changes done to handle login with otp and auto registration flow based on configuration
release: v3.5.0-rc.1 – develop → staging
Disable automatic tenant registration by default
release: v3.5.0-rc.2 – develop → staging
Use common authentication modes for tenant validation
release: v3.5.0-rc.3 – develop → staging
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1c3fb6f5-702d-45e8-9ace-cc1ae77939f2

📥 Commits

Reviewing files that changed from the base of the PR and between bc7f2be and 8e1b61f.

⛔ Files ignored due to path filters (2)
  • AGENTS.md is excluded by !**/*.md
  • src/scripts/readme.md is excluded by !**/*.md
📒 Files selected for processing (22)
  • .circleci/config.yml
  • src/constants/common.js
  • src/database/migrations/20260618090000-add-configuration-to-tenants.js
  • src/database/migrations/20260621090000-make-user-name-and-password-nullable.js
  • src/database/migrations/20260623124000-add-name-entity-type.js
  • src/database/migrations/20260713122708-update-auto-register-tenant-configuration.js
  • src/database/models/Tenant.js
  • src/database/models/users.js
  • src/dtos/tenantDTO.js
  • src/envVariables.js
  • src/generics/utils.js
  • src/locales/en.json
  • src/locales/hi.json
  • src/package.json
  • src/scripts/migrateTenantOrgData.js
  • src/services/account.js
  • src/services/admin.js
  • src/services/tenant.js
  • src/utils/usernameGenerator.js
  • src/validators/v1/account.js
  • src/validators/v1/tenant.js
  • src/validators/v1/user.js

Walkthrough

Tenant authentication configuration, OTP/password account flows, identifier validation, tenant and organization migrations, nullable account fields, and CI tooling are updated. A transactional migration script adds data-copy, role-mapping, external-ID remapping, cleanup, dry-run, and post-validation capabilities.

Changes

Tenant authentication configuration

Layer / File(s) Summary
Tenant configuration and schema
src/constants/common.js, src/envVariables.js, src/database/..., src/database/models/Tenant.js, src/validators/v1/tenant.js, src/services/tenant.js, src/dtos/tenantDTO.js
Tenant auth defaults and JSONB configuration are persisted, validated, returned, and included in tenant creation events. User name/password fields become nullable, and the name entity type is seeded.
Identifier and request validation
src/generics/utils.js, src/services/admin.js, src/validators/v1/account.js, src/validators/v1/user.js, src/utils/usernameGenerator.js, src/locales/*
Email, phone, and username classification is centralized; username-based inputs and optional credentials are validated, localized, and supported by username generation.
Tenant-aware OTP and password flow
src/services/account.js
Registration and login enforce tenant auth modes, use purpose-scoped OTP Redis keys, support username flows, and hash passwords only when supplied.

Tenant and organization migration

Layer / File(s) Summary
Migration prechecks and mappings
src/scripts/migrateTenantOrgData.js
The migration script validates source and target integrity, resolves roles, and remaps external identifiers through paged API requests.
Migration copy and cleanup
src/scripts/migrateTenantOrgData.js
Organization-scoped and user-scoped rows, relationships, roles, and optional sessions are copied, followed by configurable soft or hard source cleanup.
Migration orchestration and validation
src/scripts/migrateTenantOrgData.js
Serializable transactions, dry-run rollback, post-validation, error handling, and connection cleanup orchestrate the migration.

CI maintenance

Layer / File(s) Summary
Build environment updates
.circleci/config.yml, src/package.json
The SonarCloud orb, CircleCI machine image, workflow comment, and health-check package version are updated.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

Poem

A rabbit hops through OTP rain,
With tenant keys in tidy lanes.
Roles cross fields, IDs rearrange,
Redis guards each login change.
CI hums beneath the moon—
“Ship the carrots safely soon!”

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch staging

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/package.json

Parsing error: Unexpected token :


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nevil-mathew
nevil-mathew merged commit 79cf8c9 into master Jul 17, 2026
0 of 2 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants