Skip to content

Commit d036aa3

Browse files
committed
[DAPS-1517] Correct type import
1 parent 540088d commit d036aa3

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

core/database/foxx/api/repo_router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const g_lib = require("./support");
99
const g_tasks = require("./tasks");
1010
const { validateGlobusConfig, validatePartialGlobusConfig } = require("./repository/validation");
1111
const { RepositoryOps } = require("./repository/operations");
12+
const { RepositoryType } = require("./repository/types");
1213

1314
// Helper function to prepare repository data for saving
1415
const prepareRepoData = (obj) => {

core/database/foxx/api/tasks.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,29 @@ const tasks_func = (function () {
3232
if (!g_db._exists(a_subject_id))
3333
throw [g_lib.ERR_NOT_FOUND, "Subject, '" + a_subject_id + "', does not exist"];
3434

35-
// Check for proper permissions
36-
g_lib.ensureAdminPermRepo(a_client, a_repo_id);
35+
// Add detailed debugging via temporary error
36+
var repo = g_db.repo.document(a_repo_id);
37+
var adminEdge = g_db.admin.firstExample({
38+
_from: a_repo_id,
39+
_to: a_client._id,
40+
});
41+
42+
// Create debug info string
43+
var debugInfo = [
44+
"ALLOC_DEBUG:",
45+
"Client=" + (a_client ? a_client._id : "undefined"),
46+
"IsAdmin=" + (a_client ? a_client.is_admin : "undefined"),
47+
"Repo=" + a_repo_id,
48+
"RepoAdmins=" + (repo.admins ? JSON.stringify(repo.admins) : "none"),
49+
"AdminEdge=" + (adminEdge ? "exists" : "missing"),
50+
"Subject=" + a_subject_id
51+
].join(" | ");
52+
53+
// Temporarily throw the debug info as an error so it appears in logs
54+
throw [g_lib.ERR_INTERNAL_FAULT, debugInfo];
55+
56+
// Original permission check (commented out temporarily)
57+
// g_lib.ensureAdminPermRepo(a_client, a_repo_id);
3758

3859
// Check if there is already a matching allocation
3960
var alloc = g_db.alloc.firstExample({

0 commit comments

Comments
 (0)