show delete button when user has deleteOthersNotice right
This commit is contained in:
parent
38345d0783
commit
ee236e68df
@ -472,7 +472,10 @@ class NoticeListItem extends Widget
|
|||||||
function showDeleteLink()
|
function showDeleteLink()
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$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',
|
$deleteurl = common_local_url('deletenotice',
|
||||||
array('notice' => $this->notice->id));
|
array('notice' => $this->notice->id));
|
||||||
$this->out->element('a', array('href' => $deleteurl,
|
$this->out->element('a', array('href' => $deleteurl,
|
||||||
|
Loading…
Reference in New Issue
Block a user