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

Function isLocalSourceId

public/js/adminFolderAccess.js:812–821  ·  view source on GitHub ↗
(sourceId)

Source from the content-addressed store, hash-verified

810}
811
812function isLocalSourceId(sourceId) {
813 const sid = normalizeSourceId(sourceId);
814 if (!sid || sid === 'local') return true;
815 const data = __aclSourcesCache;
816 if (data && Array.isArray(data.sources)) {
817 const match = data.sources.find(src => String(src.id || '') === sid);
818 if (match) return String(match.type || '').toLowerCase() === 'local';
819 }
820 return false;
821}
822
823function pickGroupGrantsForSource(group, sourceId) {
824 if (!group || typeof group !== 'object') return {};

Callers 1

pickGroupGrantsForSourceFunction · 0.85

Calls 1

normalizeSourceIdFunction · 0.70

Tested by

no test coverage detected