()
| 27 | } |
| 28 | |
| 29 | async 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 | |
| 46 | function populateFolderAccessSourceSelect(selectEl, sources, activeId) { |
| 47 | if (!selectEl) return; |
no outgoing calls
no test coverage detected