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

Function onShareFolderToggle

public/js/adminFolderAccess.js:137–152  ·  view source on GitHub ↗
(row, checked)

Source from the content-addressed store, hash-verified

135}
136
137function onShareFolderToggle(row, checked) {
138 if (checked) {
139 const manage = qs(row, 'input[data-cap="manage"]');
140 const viewAll = qs(row, 'input[data-cap="view"]');
141 const viewOwn = qs(row, 'input[data-cap="viewOwn"]');
142 if (!viewAll && viewOwn && !viewOwn.checked) {
143 viewOwn.checked = true;
144 }
145 if (manage && !manage.checked) {
146 manage.checked = true;
147 }
148 if (viewAll && !viewAll.checked) {
149 viewAll.checked = true;
150 }
151 }
152}
153
154function onWriteToggle(row, checked) {
155 const caps = ["create", "upload", "edit", "rename", "copy", "delete", "extract"];

Callers 1

wireRowFunction · 0.70

Calls 1

qsFunction · 0.70

Tested by

no test coverage detected