Website Summary Files Commits Branches @commit @diff @stats
path: root / controllers / list.php
diff options
context:
space:
mode:
Commit179ebaebc36b6dc470dacad5a9020e4d6bf9921a (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-02-02 15:30:53 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-02-02 15:30:53 +0200
Files053c11e48ccda6cf22e532c5f65a98d7ff0a6dd1 /controllers/list.php
nowayforward_human-179ebaebc36b6dc470dacad5a9020e4d6bf9921a.tar
nowayforward_human-179ebaebc36b6dc470dacad5a9020e4d6bf9921a.tar.gz
nowayforward_human-179ebaebc36b6dc470dacad5a9020e4d6bf9921a.zip
Parentd7c2e638a5ea39caeadd40406f840e9b90f893d5 (diff)
feat: Allow admins to delete lists
1 files changed, 1 insertions, 1 deletions
-rw-r--r--controllers/list.php2
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;
}