aboutsummaryrefslogtreecommitdiff
path: root/profile/public/user.js
diff options
context:
space:
mode:
Diffstat (limited to 'profile/public/user.js')
-rw-r--r--profile/public/user.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/profile/public/user.js b/profile/public/user.js
index 936118e..84c4858 100644
--- a/profile/public/user.js
+++ b/profile/public/user.js
@@ -5,7 +5,12 @@ const charDiv = document.getElementById("char");
if (uid < 1 || uid > 119) window.location.assign("./users.html"); // Well
-function addUser(userData) {
+async function addUser(userData) {
+ const resp = await (await fetch("/auth/api/status")).json();
+ if (!resp.admin) {
+ userDiv.style.display = "none";
+ return;
+ }
const divs = [];
const questions = userData.questions;
const user = userData.user;