summaryrefslogtreecommitdiff
path: root/lib/notes/delete.php
diff options
context:
space:
mode:
authorroot <root@adnab.me>2014-01-31 19:08:03 +0100
committerroot <root@adnab.me>2014-01-31 19:08:03 +0100
commit77048675abf5fad43e8b5371c35e1c86b3be59c2 (patch)
tree2d77c78988a4a354af3653481785aeea00429e5e /lib/notes/delete.php
parent2a274c011d177f5ad1e863301b8b88c560a3829d (diff)
downloadBits-adnab.me-site.tar.gz
Bits-adnab.me-site.zip
Privilege changesadnab.me-site
Diffstat (limited to 'lib/notes/delete.php')
-rw-r--r--lib/notes/delete.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/notes/delete.php b/lib/notes/delete.php
index e8ef31e..43dbf44 100644
--- a/lib/notes/delete.php
+++ b/lib/notes/delete.php
@@ -4,7 +4,7 @@ assert_redir(count($args) >= 3, 'notes');
$noteid = intval($args[2]);
$note = mysql_fetch_assoc(sql("SELECT owner FROM notes WHERE id = $noteid"));
-assert_error($note && $note['owner'] == $user['id'],
+assert_error($note && ($note['owner'] == $user['id'] || $user['priv'] >= $priv_admin),
"This note does not exist, or you are not allowed to delete it.");
token_validate("Do you really want to delete this note ? All children notes will become children of the root note.", "view-notes-$noteid");