()
| 9995 | } |
| 9996 | |
| 9997 | async 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 | |
| 10025 | async function saveUserFlags() { |
| 10026 | const body = document.getElementById("userFlagsBody"); |
no test coverage detected