From a206d1a3bb2003f0f0670b458dc2b84eabfc0a5c Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 18 Apr 2025 09:11:43 +0800 Subject: [PATCH] Webadmin: Fix Edit Network when using `DenySetNetwork` (#1942) --- modules/data/webadmin/tmpl/add_edit_network.tmpl | 3 ++- modules/webadmin.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/data/webadmin/tmpl/add_edit_network.tmpl b/modules/data/webadmin/tmpl/add_edit_network.tmpl index 18f1b5fb..a0239711 100644 --- a/modules/data/webadmin/tmpl/add_edit_network.tmpl +++ b/modules/data/webadmin/tmpl/add_edit_network.tmpl @@ -31,8 +31,9 @@
- " disabled /> +
diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index e401d965..283f285a 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -1030,20 +1030,20 @@ class CWebAdminMod : public CModule { if (spSession->IsAdmin() || !spSession->GetUser()->DenySetIdent()) { Tmpl["IdentEdit"] = "true"; - Tmpl["Ident"] = pNetwork->GetIdent(); } + Tmpl["Ident"] = pNetwork->GetIdent(); if (spSession->IsAdmin() || !spSession->GetUser()->DenySetRealName()) { Tmpl["RealNameEdit"] = "true"; - Tmpl["RealName"] = pNetwork->GetRealName(); } + Tmpl["RealName"] = pNetwork->GetRealName(); if (spSession->IsAdmin() || !spSession->GetUser()->DenySetQuitMsg()) { Tmpl["QuitMsgEdit"] = "true"; - Tmpl["QuitMsg"] = pNetwork->GetQuitMsg(); } + Tmpl["QuitMsg"] = pNetwork->GetQuitMsg(); Tmpl["NetworkEdit"] = spSession->IsAdmin() || !spSession->GetUser()->DenySetNetwork()