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

Function setGroupGrantsForSource

public/js/adminFolderAccess.js:851–862  ·  view source on GitHub ↗
(group, sourceId, grants)

Source from the content-addressed store, hash-verified

849}
850
851function setGroupGrantsForSource(group, sourceId, grants) {
852 if (!group || typeof group !== 'object') return;
853 const sid = normalizeSourceId(sourceId);
854 if (!sid) {
855 group.grants = grants;
856 return;
857 }
858 if (!group.grantsBySource || typeof group.grantsBySource !== 'object' || Array.isArray(group.grantsBySource)) {
859 group.grantsBySource = {};
860 }
861 group.grantsBySource[sid] = grants;
862}
863
864function computeGroupGrantMaskForUser(username, folders = [], sourceId = null) {
865 const mask = {};

Callers 1

saveGroupAclFromUIFunction · 0.85

Calls 1

normalizeSourceIdFunction · 0.70

Tested by

no test coverage detected