hide edit button for comments made by others (#31011)

This commit is contained in:
Frédéric Péters 2019-02-28 22:27:24 +01:00
parent f16cafc034
commit 5660af4f89
1 changed files with 10 additions and 0 deletions

View File

@ -199,6 +199,16 @@ $(function() {
});
}
var user_href = $('#loggedas a').attr('href');
if (user_href) {
$('div.journal.has-notes').each(function(idx, entry) {
var user_entry_href = $(entry).find('a.user').attr('href');
if (user_entry_href && user_entry_href != user_href) {
$(entry).find('.icon-edit').hide();
}
});
}
if ($('.administration').length == 0) {
/* fake access control */
return;