show delete button when user has deleteOthersNotice right

This commit is contained in:
Evan Prodromou 2009-09-27 21:05:29 -04:00
parent 38345d0783
commit ee236e68df
1 changed files with 4 additions and 1 deletions

View File

@ -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,