()
| 10157 | |
| 10158 | // Load this group's folder ACL (from __groupsCache) and show it read-only |
| 10159 | async function ensureLoaded() { |
| 10160 | if (grantsBox.dataset.loaded === "1") return; |
| 10161 | try { |
| 10162 | const group = __groupsCache[name] || {}; |
| 10163 | const grants = group.grants || {}; |
| 10164 | |
| 10165 | renderFolderGrantsUI( |
| 10166 | name, |
| 10167 | grantsBox, |
| 10168 | orderedFolders, |
| 10169 | grants |
| 10170 | ); |
| 10171 | |
| 10172 | // Make it clear: edit in User groups → Edit folder access |
| 10173 | grantsBox.querySelectorAll('input[type="checkbox"]').forEach(cb => { |
| 10174 | cb.disabled = true; |
| 10175 | cb.title = tf( |
| 10176 | "edit_group_acl_in_user_groups", |
| 10177 | "Group ACL is read-only here. Use User groups → Edit folder access to change it." |
| 10178 | ); |
| 10179 | }); |
| 10180 | |
| 10181 | grantsBox.dataset.loaded = "1"; |
| 10182 | } catch (e) { |
| 10183 | console.error(e); |
| 10184 | grantsBox.innerHTML = `<div class="muted">${tf("error_loading_group_grants", "Error loading group grants")}</div>`; |
| 10185 | } |
| 10186 | } |
| 10187 | |
| 10188 | function toggleOpen() { |
| 10189 | const willShow = details.style.display === "none"; |
no test coverage detected