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

Function saveGroupAclFromUI

public/js/adminFolderAccess.js:1868–1888  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1866}
1867
1868function saveGroupAclFromUI() {
1869 const modal = document.getElementById('groupAclModal');
1870 if (!modal) return;
1871 const groupName = modal.dataset.groupName;
1872 if (!groupName) return;
1873
1874 const body = document.getElementById('groupAclBody');
1875 if (!body) return;
1876 const box = body.querySelector('.folder-grants-box');
1877 if (!box) return;
1878
1879 const grants = collectGrantsFrom(box, box.__grantsFallback || {});
1880 const sourceId = getFolderAccessSourceId();
1881 if (!__groupsCache[groupName]) {
1882 __groupsCache[groupName] = { name: groupName, label: groupName, members: [], grants: {} };
1883 }
1884 setGroupGrantsForSource(__groupsCache[groupName], sourceId, grants);
1885
1886 showToast(t('admin_group_access_updated'));
1887 modal.style.display = 'none';
1888}
1889
1890export { computeGroupGrantMaskForUser, applyGroupLocksForUser, isAdminUser };

Callers

nothing calls this directly

Calls 5

collectGrantsFromFunction · 0.85
getFolderAccessSourceIdFunction · 0.85
setGroupGrantsForSourceFunction · 0.85
tFunction · 0.85
showToastFunction · 0.70

Tested by

no test coverage detected