@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.cjs CHANGED
@@ -39,6 +39,7 @@ module.exports = __toCommonJS(index_exports);
39
39
 
40
40
  // src/rest-server.ts
41
41
  var import_core2 = require("@objectstack/core");
42
+ var import_types = require("@objectstack/types");
42
43
 
43
44
  // src/route-manager.ts
44
45
  var RouteManager = class {
@@ -1793,7 +1794,7 @@ var RestServer = class {
1793
1794
  userId: authz.userId,
1794
1795
  tenantId: authz.tenantId,
1795
1796
  email: authz.email,
1796
- roles: authz.roles,
1797
+ positions: authz.positions,
1797
1798
  permissions: authz.permissions,
1798
1799
  systemPermissions: authz.systemPermissions,
1799
1800
  ...authz.tabPermissions ? { tabPermissions: authz.tabPermissions } : {},
@@ -2251,8 +2252,7 @@ var RestServer = class {
2251
2252
  if (this.config.api.enableUi) {
2252
2253
  discovery.routes.ui = `${realBase}/ui`;
2253
2254
  }
2254
- const mcpEnabled = globalThis?.process?.env?.OS_MCP_SERVER_ENABLED === "true";
2255
- if (mcpEnabled) {
2255
+ if ((0, import_types.isMcpServerEnabled)()) {
2256
2256
  const unscopedBase = isScoped ? basePath.replace(/\/(environments|projects)\/:environmentId$/, "") : basePath;
2257
2257
  discovery.routes.mcp = `${unscopedBase}/mcp`;
2258
2258
  } else {