summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-12-08 08:06:24 +0100
committerYorhel <git@yorhel.nl>2019-12-08 08:06:26 +0100
commitc66762abe743cc43ce414aaaf2a672bd62633346 (patch)
treea152bca32c512ccb6ba22bdce98026661de75d28
parenta9975cebe40a8ccc200dceec350d7589a10de559 (diff)
Discussions: Add exception for uid 2 in sql_visible_threads()
Turns out the recent update didn't allow me to moderate private threads anymore. :( I decided not make it a boardmod feature this time, one person for moderating private threads is enough.
-rw-r--r--lib/VNWeb/Discussions/Lib.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VNWeb/Discussions/Lib.pm b/lib/VNWeb/Discussions/Lib.pm
index 4ab1900c..f2d6c98d 100644
--- a/lib/VNWeb/Discussions/Lib.pm
+++ b/lib/VNWeb/Discussions/Lib.pm
@@ -15,6 +15,7 @@ sub post_url {
# Returns a WHERE condition to filter threads that the current user is allowed to see.
sub sql_visible_threads {
+ return '1=1' if auth && auth->uid == 2; # Yorhel sees everything
sql_and
auth->permBoardmod ? () : ('NOT t.hidden'),
sql('NOT t.private OR EXISTS(SELECT 1 FROM threads_boards WHERE tid = t.id AND type = \'u\' AND iid =', \auth->uid, ')');