@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 +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
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
|
-
|
|
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
|
-
|
|
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 {
|