()
| 1329 | const grantsBox = row.querySelector(".folder-grants-box"); |
| 1330 | |
| 1331 | async function ensureLoaded() { |
| 1332 | if (grantsBox.dataset.loaded === "1") return; |
| 1333 | try { |
| 1334 | const group = __groupsCache[name] || {}; |
| 1335 | const grants = pickGroupGrantsForSource(group, sourceId); |
| 1336 | |
| 1337 | renderFolderGrantsUI( |
| 1338 | name, |
| 1339 | grantsBox, |
| 1340 | orderedFolders, |
| 1341 | grants |
| 1342 | ); |
| 1343 | |
| 1344 | grantsBox.querySelectorAll('input[type="checkbox"]').forEach(cb => { |
| 1345 | cb.disabled = true; |
| 1346 | cb.title = tf( |
| 1347 | "edit_group_acl_in_user_groups", |
| 1348 | "Group ACL is read-only here. Use User groups → Edit folder access to change it." |
| 1349 | ); |
| 1350 | }); |
| 1351 | |
| 1352 | grantsBox.__grantsFallback = grants; |
| 1353 | grantsBox.dataset.loaded = "1"; |
| 1354 | } catch (e) { |
| 1355 | console.error(e); |
| 1356 | grantsBox.innerHTML = `<div class="muted">${tf("error_loading_group_grants", "Error loading group grants")}</div>`; |
| 1357 | } |
| 1358 | } |
| 1359 | |
| 1360 | function toggleOpen() { |
| 1361 | const willShow = details.style.display === "none"; |
no test coverage detected