From 4534b6e163b97ba019ca222d136aec8d4213f0b0 Mon Sep 17 00:00:00 2001
From: echicken <>
Date: Sat, 28 Sep 2013 06:28:41 +0000
Subject: [PATCH] Whoops, apparently MsgBase.cfg.operator_ars is not good
 enough unless operator ARS has been set explicitly on a given sub. Will allow
 non-email deletion only for user #1 for the time being, to be revisited
 later.

---
 web/lib/forum.ssjs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/web/lib/forum.ssjs b/web/lib/forum.ssjs
index 1be14515ef..ba45dc972e 100644
--- a/web/lib/forum.ssjs
+++ b/web/lib/forum.ssjs
@@ -176,7 +176,8 @@ var printThread = function(sub, t) {
 			system.timestr(header.when_written_time),
 			linkify(strip_exascii(body).replace(/\r\n/g, "<br />").replace(/\n/g, "<br />"))
 		);
-		if(sub == 'mail' || user.compare_ars(msgBase.cfg.operator_ars)) {
+//		if(sub == 'mail' || user.compare_ars(msgBase.cfg.operator_ars)) {
+		if(sub == 'mail' || user.number == 1) {
 			out += format(
 				"<a class='ulLink' onclick='deleteMessage(\"http://%s/%sforum-async.ssjs\", \"%s\", \"%s\", \"sub-%s-thread-%s-%s\")'>Delete Message</a> - ",
 				http_request.host, webIni.appendURL, sub, header.number, sub, t, header.number
@@ -291,7 +292,8 @@ var deleteMessage = function(sub, message) {
 		log(LOG_ERR, err);
 		return false;
 	}
-	if(sub != "mail" && !user.compare_ars(msgBase.cfg.operator_ars)) {
+//	if(sub != "mail" && !user.compare_ars(msgBase.cfg.operator_ars)) {
+	if(sub != "mail" && !user.number != 1) {
 		print("You're not allowed to delete that message.");
 		return false;
 	}
-- 
GitLab