@objectstack/rest 12.6.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // src/rest-server.ts
2
2
  import { resolveAuthzContext, resolveLocalizationContext, isAuthGateAllowlisted } from "@objectstack/core";
3
+ import { isMcpServerEnabled } from "@objectstack/types";
3
4
 
4
5
  // src/route-manager.ts
5
6
  var RouteManager = class {
@@ -1753,7 +1754,7 @@ var RestServer = class {
1753
1754
  userId: authz.userId,
1754
1755
  tenantId: authz.tenantId,
1755
1756
  email: authz.email,
1756
- roles: authz.roles,
1757
+ positions: authz.positions,
1757
1758
  permissions: authz.permissions,
1758
1759
  systemPermissions: authz.systemPermissions,
1759
1760
  ...authz.tabPermissions ? { tabPermissions: authz.tabPermissions } : {},
@@ -2211,8 +2212,7 @@ var RestServer = class {
2211
2212
  if (this.config.api.enableUi) {
2212
2213
  discovery.routes.ui = `${realBase}/ui`;
2213
2214
  }
2214
- const mcpEnabled = globalThis?.process?.env?.OS_MCP_SERVER_ENABLED === "true";
2215
- if (mcpEnabled) {
2215
+ if (isMcpServerEnabled()) {
2216
2216
  const unscopedBase = isScoped ? basePath.replace(/\/(environments|projects)\/:environmentId$/, "") : basePath;
2217
2217
  discovery.routes.mcp = `${unscopedBase}/mcp`;
2218
2218
  } else {