summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/noticelist.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index c2ff7c26b..6c296f82a 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -472,7 +472,10 @@ class NoticeListItem extends Widget
function showDeleteLink()
{
$user = common_current_user();
- if ($user && $this->notice->profile_id == $user->id) {
+
+ if (!empty($user) &&
+ ($this->notice->profile_id == $user->id || $user->hasRight(Right::deleteOthersNotice))) {
+
$deleteurl = common_local_url('deletenotice',
array('notice' => $this->notice->id));
$this->out->element('a', array('href' => $deleteurl,