We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit ee236e68 authored by Evan Prodromou's avatar Evan Prodromou

show delete button when user has deleteOthersNotice right

parent 38345d07
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment