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

Function loadFolderAccessSources

public/js/adminFolderAccess.js:29–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29async function loadFolderAccessSources() {
30 if (__aclSourcesCache) return __aclSourcesCache;
31 if (typeof window !== 'undefined' && window.__FR_IS_PRO === false) {
32 return null;
33 }
34 try {
35 const res = await fetch('/api/pro/sources/list.php', { credentials: 'include' });
36 if (!res.ok) return null;
37 const data = await res.json().catch(() => null);
38 if (!data || data.ok !== true || !data.enabled) return null;
39 __aclSourcesCache = data;
40 return data;
41 } catch (e) {
42 return null;
43 }
44}
45
46function populateFolderAccessSourceSelect(selectEl, sources, activeId) {
47 if (!selectEl) return;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected