Skip to content

chore: removed all namespace and reference#5478

Merged
akhilmhdh merged 1 commit intomainfrom
chore/namespace-strip
Feb 24, 2026
Merged

chore: removed all namespace and reference#5478
akhilmhdh merged 1 commit intomainfrom
chore/namespace-strip

Conversation

@akhilmhdh
Copy link
Member

Context

This PR removes all references and code base things we added temporarily back for namespace implementation. Namespace is removed because our architecture switched to sub-org implementation.

Screenshots

Steps to verify the change

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist

  • Title follows the conventional commit format: type(scope): short description (scope is optional, e.g., fix: prevent crash on sync or fix(api): handle null response).
  • Tested locally
  • Updated docs (if needed)
  • Read the contributing guide

@maidul98
Copy link
Collaborator

maidul98 commented Feb 13, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 13, 2026

Greptile Overview

Greptile Summary

This PR systematically removes all namespace-related code from the backend codebase, transitioning to a sub-org architecture. The changes span database migrations, schemas, type definitions, and service layers.

Key Changes:

  • Created idempotent database migration to drop scopeNamespaceId column from Membership table, namespaceId from Role and AdditionalPrivilege tables, and the entire Namespace table
  • Removed AccessScope.Namespace enum value and associated type definitions from AccessScopeData
  • Cleaned up all namespace-scoped query logic from DAL methods across membership-user, membership-identity, membership-group, and permission services
  • Removed namespace factory implementations and registrations from all service layers (roles, additional-privileges, memberships, identity)
  • Updated check constraint on Membership table to only allow project and organization scopes

Assessment:
The cleanup is thorough and consistent across the codebase. The migration is properly idempotent with existence checks before dropping columns/tables. No namespace references remain in the changed files.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The PR performs a clean, systematic removal of namespace functionality with proper idempotent migrations, consistent updates across all affected layers, and no breaking changes to external APIs (only internal type changes). The migration safely handles cases where columns may already be dropped, making it safe for re-execution.
  • No files require special attention

Important Files Changed

Filename Overview
backend/src/db/migrations/20260213152852_remove-namespace.ts Idempotent migration that safely removes namespace-related columns and table with proper existence checks
backend/src/db/schemas/models.ts Removed AccessScope.Namespace enum value and namespace-scoped AccessScopeData type definition
backend/src/services/membership-user/membership-user-dal.ts Removed namespace scope query conditions from DAL methods
backend/src/services/convertor/convertor-service.ts Removed namespace scope handling in field name logic
backend/src/ee/services/permission/permission-dal.ts Removed namespace scope handling from join conditions and query filters

Last reviewed commit: 6a2f9cb

@akhilmhdh akhilmhdh requested review from IgorHorta and removed request for victorvhs017 February 13, 2026 18:40
@akhilmhdh akhilmhdh force-pushed the chore/namespace-strip branch from 6a2f9cb to 671e408 Compare February 23, 2026 14:16
Copy link
Contributor

@IgorHorta IgorHorta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akhilmhdh akhilmhdh merged commit f83f4a0 into main Feb 24, 2026
10 of 11 checks passed
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