From 179ebaebc36b6dc470dacad5a9020e4d6bf9921a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 2 Feb 2025 15:30:53 +0200 Subject: feat: Allow admins to delete lists --- controllers/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'controllers/list.php') diff --git a/controllers/list.php b/controllers/list.php index e608136..7056088 100644 --- a/controllers/list.php +++ b/controllers/list.php @@ -102,7 +102,7 @@ function on_delete() { try { $user = Database\Cookie::fromDB($TOKEN); $author = Database\User::fromDBuid($list->AuthorUID); - if ($author->UID !== $user->UID) { + if ($author->UID !== $user->UID && $user->Role !== 'Admin') { $list_status = "You're not the owner of this list! You have no permission to delete it!"; return; } -- cgit v1.2.3