From cf09bfea3b5c5900532df8f3bf44e7f5a9804a92 Mon Sep 17 00:00:00 2001 From: Liyang Zhu <1184997399@qq.com> Date: Sun, 12 Jun 2022 00:24:23 +0800 Subject: [PATCH] fix: fix who-can-sign-up permission check --- src/routes/setting/Overview.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/routes/setting/Overview.js b/src/routes/setting/Overview.js index 6d30c2a7..5451579f 100644 --- a/src/routes/setting/Overview.js +++ b/src/routes/setting/Overview.js @@ -217,21 +217,23 @@ export default function Overview() { placeholder="Tell the world a bit about this server" /> -
-

Default Sign Up

-

Who can sign up this server.

- - setLoginConfigValues({ - ...loginConfig, - who_can_sign_up: v - }) - } - /> -
+ {isAdmin && ( +
+

Default Sign Up

+

Who can sign up this server.

+ + setLoginConfigValues({ + ...loginConfig, + who_can_sign_up: v + }) + } + /> +
+ )} {changed && } {/* */}