Skip to content

Tenants V2

Overview

Tenants V2 is the earlier platform screen for maintaining tenants: a list of every tenant with its catalogue and member counts, a create form, and an edit form that changes the tenant’s name and status, adds members, and sets a per-tenant password policy. It is a ROOT-ADMIN applet on the shared akaun_master database. The newer Platform SysAdmin applet covers the same ground with more tabs and different endpoints; this applet is still registered and installed (1 tenant, 2 catalogues, measured 2026-09-16).

The application’s own title bar says Tenant Applet; the registry name, and the title of this page, is Tenants V2.

Creating a tenant does not work today — from this applet, from Platform SysAdmin, or from the API. Provisioning fails with Failed to obtain JDBC Connection and leaves an orphaned tenant row. See Troubleshooting and blg-intranet#5895.

Where it fits

DirectionWhatWhy
SiblingPlatform SysAdminTenant menuThe newer console for the same rows. It calls the sysadmin-ep endpoints (authorised by sysadmin rank); this applet calls the plain endpoints (authorised by the platform permission tables).
DownstreamTenant Admin AppletAdministers one tenant from inside it once the tenant exists.

Screens and menus

The menu has one working entry, Tenant Listing, plus the shared Settings and Personalization groups.

ScreenWhat it shows / does
Tenant ListingGET /core2/platform/dm/tenants/query — Tenant Name, Tenant Code, No. of Catalogs, No. of Members, Status, Owner, Creation Date, Modified Date. The counts and the owner are resolved per row with follow-up calls to the catalogue and login-principal endpoints.
CreateTenant Name, Tenant Code (both required), Status, Tenant Type, Subscription — only name, code and status are sent.
Edit → DetailsName, Code, No. of Catalogs, Members, Subscription, Status, audit columns; a red Delete button.
Edit → Applet CatalogSearch box and a Create button over the tenant’s catalogues.
Edit → MembersSearch box and a Create button that opens Add Member.
Edit → RDSEmpty tab — the template has no content.
Edit → Password PolicyPolicy Start Date, Policy End Date, Max Password Age, Min Password Length — all required.
SettingsDefault Selection, Field Settings, Webhook, Feature Visibility, Permission Set / User / Team / Role Permission (shared components).

Configuration

Before you can use it

  • Platform permissions, not sysadmin rank. Unlike Platform SysAdmin, every call here goes to the plain platform endpoints: the listing needs MST_API_TNT_MGT_TENANT_READ (TenantController.java L402–L428) and Create needs MST_API_TNT_MGT_TENANT_CREATE (L117–L142), resolved through the platform permission tables. A platform system administrator who holds no permission rows is refused by this applet and accepted by Platform SysAdmin — the two authorisation models side by side.
  • The applet must be installed for your login through a catalogue.

Applet settings

No exposed control found (routes and settings components checked at commit 6c56eb2). Field Settings renders eight slide-toggles bound to no form control, with no save handler — the same unbound stub as in Platform SysAdmin. No component reads an applet setting.

Settings in other applets that control this applet

None found.

Feature visibility / permissions

bl_applet_client_side_perm_dfn has 0 rows for tenantAppletv2 (queried 2026-09-16) and the applet checks no SHOW_* / HIDE_* code. What varies by user is the backend’s answer, per the permissions above.

Fields

Create

FieldMeaningRequiredNotes
Tenant NameDisplay nameYesThe key-press filter allows letters, digits, space, hyphen and underscore (blockSpecialChar), but the backend accepts [_a-zA-Z0-9]+ only — a name with a space or hyphen passes the screen and is rejected on save.
Tenant CodeDatabase and login identifierYesSame backend rule; lower-cased to name the database.
StatusACTIVE / INACTIVE
Tenant Type, SubscriptionRendered; not sent (tenant.effects.ts L65–L74 copies code, name and status only).

Edit → Details

Name, Code and Status are editable and saved; No. of Catalogs, Members, Subscription and the audit columns are display-only.

Edit → Password Policy

FieldMeaningRequiredNotes
Policy Start Date, Policy End DateValidity window of the policyYes
Max Password AgeDaysYesSaved to app_password_policy_line.max_password_age
Min Password LengthCharactersYesSaved to app_password_policy_line.min_password_length

Because all four are required, SAVE on the Details tab is disabled until a policy is filled in, even when you only wanted to rename the tenant.

Add Member

FieldMeaningRequiredNotes
EmailE-mail of an existing platform userYesVerified in two steps: does a platform principal exist (…/app-login-principals/query); does a tenant profile exist (tenant-user-profiles by principal id). Messages: “The user doesn’t exist in the root”, “User does’t exist in tenant”, “User email ‘…’ is valid”.
RankRank in the tenantYes

Lifecycle and effects

ActionEndpointWhat it writes
CreatePOST /core2/platform/dm/tenants (ts-lib TenantService.post; tenant.effects.ts L78)TenantController.createTenant L117: permission check, then TenantService.createTenant — inserts app_tenant_hdr, provisions a database, registers app_generic_resources_hdr, links the creator as OWNER, queues DefaultTenantConfigProcessor — and writes an audit-trail row (L133–L142). This is the only one of the four creation endpoints that does.
Edit → SAVEGET /core2/platform/dm/tenants/{guid} then PUT /core2/platform/dm/tenants (tenant.effects.ts L110–L160)Updates code, name and status only. In the same click the Password Policy is upserted: GET …/password-policy-lines/query by tenant_guid (with the visa’s tenant code forced to akaun_master), then PUT if a line exists for this tenant, otherwise POST (tenant-edit.component.ts L748–L800).
Edit → DeleteDELETE /core2/platform/dm/tenants/{guid} (tenant.effects.ts L166–L168, base delete())Cannot succeed as written. The backend route is DELETE /tenants/{tenantCode} and looks the tenant up by code (TenantController.java L203–L212); the applet sends the guid, so the lookup throws tenant code does not exist. The effect’s catchError is also placed inside map’s argument list rather than in the pipe, so the failure is not turned into a failure action.
Add MemberPOST /core2/tenant/dm/users?type=EMAIL_USERNAME&value=<email> (tenant-add-member.component.ts L194–L199)A tenant-domain call, scoped by apiVisa.tenantCode. The applet sets that from sessionStorage('tenantCode') — the tenant the operator is signed into (services/tenant.service.ts L5, tenant-add-member.component.ts L113) — not from the tenant being edited. Authorised by isUserOwnerOrAdmin in that tenant (TenantUserController.java L38–L54).

No stock or journal effect; nothing is posted.

Related applets

Troubleshooting

SymptomCauseFix
Create fails after several minutes with HTTP 417 “Failed to obtain JDBC Connection”, and the tenant then appears in the list as ACTIVETenantService.createTenant inserts the app_tenant_hdr row, then provisioning fails because the new RDS instance is placed in a security group the application cannot reach; nothing rolls the row back (TenantService.java L127–L129 onwards). Two production attempts on 2026-09-16, both failed.Do not retry — each retry adds another orphaned row. Tracked as blg-intranet#5895.
“Only alphanumerics and underscore allowed in tenant code/name !”The screen’s key filter is looser than the backend’s [_a-zA-Z0-9]+, which applies to the name as well as the code.Remove spaces and hyphens from both.
“Users’ email is not verified !”The creator’s own e-mail principal must be confirmed (TenantService.java L104–L109).Confirm your e-mail first.
The listing is empty or not authorised although you are a platform system administratorThis applet is authorised by the platform permission tables (MST_API_TNT_MGT_TENANT_READ), which sysadmin rank does not grant.Have the permissions assigned, or use Platform SysAdmin.
A member added here appears in the wrong tenantThe add-member call is scoped by the operator’s session tenant, not the edited tenant.Add users to a tenant from Platform SysAdmin → Tenant → Users → Add.
Delete does nothing visibleThe endpoint is called with a guid where the backend expects a code (see Lifecycle).There is no working tenant delete in either platform applet.
SAVE stays disabled on the Details tabThe four Password Policy fields are required for the whole form.Fill in the policy tab first.

Related documentation

Last updated on