MCPcopy Create free account
hub / github.com/error311/FileRise / markInheritFlags

Function markInheritFlags

public/js/adminFolderAccess.js:1427–1451  ·  view source on GitHub ↗
(map, defaultVal)

Source from the content-addressed store, hash-verified

1425 : baseGrants;
1426
1427 const markInheritFlags = (map, defaultVal) => {
1428 if (!map || typeof map !== "object") return;
1429 Object.keys(map).forEach(key => {
1430 const entry = map[key];
1431 if (!entry || typeof entry !== "object") return;
1432 if (typeof entry.__explicit === "undefined") {
1433 if (typeof entry.explicit !== "undefined") {
1434 entry.__explicit = !!entry.explicit;
1435 } else {
1436 entry.__explicit = !!defaultVal;
1437 }
1438 } else {
1439 entry.__explicit = !!entry.__explicit;
1440 }
1441 if (typeof entry.__inherit === "undefined") {
1442 if (typeof entry.inherit !== "undefined") {
1443 entry.__inherit = !!entry.inherit;
1444 } else {
1445 entry.__inherit = !!defaultVal;
1446 }
1447 } else {
1448 entry.__inherit = !!entry.__inherit;
1449 }
1450 });
1451 };
1452 markInheritFlags(grants, isAdmin);
1453 renderFolderGrantsUI(
1454 username,

Callers 1

ensureLoadedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected