gamedev 0.2.3 → 0.2.4
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/build/index.js +6 -2
- package/build/index.js.map +2 -2
- package/build/public/admin.html +2 -2
- package/build/public/index.html +2 -2
- package/package.json +1 -1
- package/src/server/admin.js +7 -3
package/build/index.js
CHANGED
|
@@ -61788,6 +61788,9 @@ async function admin(fastify2, {
|
|
|
61788
61788
|
return { builder: true, deploy: true };
|
|
61789
61789
|
}
|
|
61790
61790
|
async function getCapabilitiesFromAuthToken(token) {
|
|
61791
|
+
if (allowsOpenAdminAccess(process.env)) {
|
|
61792
|
+
return { builder: true, deploy: true };
|
|
61793
|
+
}
|
|
61791
61794
|
if (!token || !db2) return { builder: false, deploy: false };
|
|
61792
61795
|
const worldId = world2?.network?.worldId || process.env.WORLD_ID;
|
|
61793
61796
|
const claims = await readJWT(token, { worldId });
|
|
@@ -62193,9 +62196,10 @@ async function admin(fastify2, {
|
|
|
62193
62196
|
ws2.close();
|
|
62194
62197
|
return;
|
|
62195
62198
|
}
|
|
62199
|
+
const openAdminAccess = allowsOpenAdminAccess(process.env);
|
|
62196
62200
|
const codeCapabilities = getCapabilitiesFromAdminCode(data?.code);
|
|
62197
|
-
let builderOk = codeCapabilities.builder;
|
|
62198
|
-
let deployOk = codeCapabilities.deploy;
|
|
62201
|
+
let builderOk = openAdminAccess || codeCapabilities.builder;
|
|
62202
|
+
let deployOk = openAdminAccess || codeCapabilities.deploy;
|
|
62199
62203
|
if (!builderOk || !deployOk) {
|
|
62200
62204
|
const payloadToken = typeof data?.authToken === "string" ? data.authToken.trim() : "";
|
|
62201
62205
|
const headerToken = getRuntimeAuthTokenFromRequest(req) || "";
|