Skip to content

Commit d652eb9

Browse files
chiragjncursoragent
andcommitted
fix(trueforge): remove TrueFoundry global admin
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 284762f commit d652eb9

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@truefoundry/trueforge': minor
3+
---
4+
5+
Stop treating TrueFoundry control-plane roles as tenant-wide TrueForge administrator access.

‎packages/trueforge/src/auth/identity.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import type { Context } from 'hono';
33

44
import configuration, { getTrueForgeMode, isOidcConfigured, TrueForgeMode } from '../config';
55

6-
/** TrueFoundry Control Plane role treated as admin until mapping is settled. */
7-
export const TRUEFOUNDRY_ADMIN_ROLE = 'tenant-admin';
8-
96
/** Standalone / default TrueForge admin role string. */
107
export const STANDALONE_ADMIN_ROLE = 'admin';
118

@@ -55,13 +52,12 @@ export function resolveRequestContext(c: Context): RequestContext {
5552
* Mode and OIDC admin claim value come from process config ({@link getTrueForgeMode}).
5653
* - Standalone: `roles` includes `admin`
5754
* - OIDC: `roles` includes configured `OIDC_ADMIN_ROLE_VALUE`
58-
* - TrueFoundry: `roles` includes `tenant-admin` (temporary; revisit mapping later)
55+
* - TrueFoundry: no tenant-wide TrueForge admin
5956
*/
6057
export function hasAdminRole(requestContext: Pick<RequestContext, 'roles'>): boolean {
6158
switch (getTrueForgeMode()) {
6259
case TrueForgeMode.TrueFoundry:
63-
// TODO: stop treating `tenant-admin` as TrueForge admin once TFY role mapping is settled.
64-
return requestContext.roles.includes(TRUEFOUNDRY_ADMIN_ROLE);
60+
return false;
6561
case TrueForgeMode.Oidc: {
6662
const adminValue = isOidcConfigured(configuration)
6763
? configuration.OIDC.OIDC_ADMIN_ROLE_VALUE

0 commit comments

Comments
 (0)