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.
Failed to obtain JDBC Connection and leaves an orphaned tenant
row. See Troubleshooting and
blg-intranet#5895.Where it fits
| Direction | What | Why |
|---|---|---|
| Sibling | Platform SysAdmin — Tenant menu | The 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). |
| Downstream | Tenant Admin Applet | Administers 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.
| Screen | What it shows / does |
|---|---|
| Tenant Listing | GET /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. |
| Create | Tenant Name, Tenant Code (both required), Status, Tenant Type, Subscription — only name, code and status are sent. |
| Edit → Details | Name, Code, No. of Catalogs, Members, Subscription, Status, audit columns; a red Delete button. |
| Edit → Applet Catalog | Search box and a Create button over the tenant’s catalogues. |
| Edit → Members | Search box and a Create button that opens Add Member. |
| Edit → RDS | Empty tab — the template has no content. |
| Edit → Password Policy | Policy Start Date, Policy End Date, Max Password Age, Min Password Length — all required. |
| Settings | Default 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.javaL402–L428) and Create needsMST_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
| Field | Meaning | Required | Notes |
|---|---|---|---|
| Tenant Name | Display name | Yes | The 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 Code | Database and login identifier | Yes | Same backend rule; lower-cased to name the database. |
| Status | ACTIVE / INACTIVE | – | |
| Tenant Type, Subscription | – | – | Rendered; 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
| Field | Meaning | Required | Notes |
|---|---|---|---|
| Policy Start Date, Policy End Date | Validity window of the policy | Yes | |
| Max Password Age | Days | Yes | Saved to app_password_policy_line.max_password_age |
| Min Password Length | Characters | Yes | Saved 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
| Field | Meaning | Required | Notes |
|---|---|---|---|
| E-mail of an existing platform user | Yes | Verified 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”. | |
| Rank | Rank in the tenant | Yes |
Lifecycle and effects
| Action | Endpoint | What it writes |
|---|---|---|
| Create | POST /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 → SAVE | GET /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 → Delete | DELETE /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 Member | POST /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
- Platform SysAdmin — the newer console; use it to add a user to a specific tenant, which works there.
- Tenant Admin Applet — a tenant’s own administration once it exists.
- Developer SysAdmin Applet — the applet registry that the Applet Catalog tab draws from.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Create fails after several minutes with HTTP 417 “Failed to obtain JDBC Connection”, and the tenant then appears in the list as ACTIVE | TenantService.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 administrator | This 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 tenant | The 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 visible | The 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 tab | The four Password Policy fields are required for the whole form. | Fill in the policy tab first. |
Related documentation
- Platform applets — the section hub.
- Platform SysAdmin — the authorisation model the two tenant applets do not share.