aboutsummaryrefslogtreecommitdiff
path: root/controllers/list.php
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-02-02 15:30:53 +0200
committerSyndamia <kamen@syndamia.com>2025-02-02 15:30:53 +0200
commit179ebaebc36b6dc470dacad5a9020e4d6bf9921a (patch)
tree053c11e48ccda6cf22e532c5f65a98d7ff0a6dd1 /controllers/list.php
parentd7c2e638a5ea39caeadd40406f840e9b90f893d5 (diff)
downloadnowayforward_human-179ebaebc36b6dc470dacad5a9020e4d6bf9921a.tar
nowayforward_human-179ebaebc36b6dc470dacad5a9020e4d6bf9921a.tar.gz
nowayforward_human-179ebaebc36b6dc470dacad5a9020e4d6bf9921a.zip
feat: Allow admins to delete lists
Diffstat (limited to 'controllers/list.php')
-rw-r--r--controllers/list.php2
1 files changed, 1 insertions, 1 deletions
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;
}