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

Function loadUserFlagsList

public/js/adminPanel.js:9997–10023  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9995}
9996
9997async function loadUserFlagsList() {
9998 const body = document.getElementById("userFlagsBody");
9999 if (!body) return;
10000 body.textContent = `${t("loading")}…`;
10001 try {
10002 const users = await fetchAllUsers();
10003 const flagsMap = await fetchAllUserFlags();
10004 const rows = users.map(u => flagRow(u, flagsMap)).filter(Boolean).join("");
10005 body.innerHTML = `
10006 <table class="table table-sm" style="width:100%;">
10007 <thead>
10008 <tr>
10009 <th>${t("user")}</th>
10010 <th>${t("read_only")}</th>
10011 <th>${t("disable_upload")}</th>
10012 <th>${t("can_share")}</th>
10013 <th>${t("bypass_ownership")}</th>
10014 </tr>
10015 </thead>
10016 <tbody>${rows || `<tr><td colspan="6">${t("no_users_found")}</td></tr>`}</tbody>
10017 </table>
10018 `;
10019 } catch (e) {
10020 console.error(e);
10021 body.innerHTML = `<div class="muted">${t("error_loading_users")}</div>`;
10022 }
10023}
10024
10025async function saveUserFlags() {
10026 const body = document.getElementById("userFlagsBody");

Callers 1

openUserFlagsModalFunction · 0.85

Calls 4

tFunction · 0.85
fetchAllUsersFunction · 0.85
fetchAllUserFlagsFunction · 0.85
flagRowFunction · 0.85

Tested by

no test coverage detected