mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 16:10:48 +08:00
FIX: Moderators/Admins cannot delete other user's bookmarks
This commit is contained in:
parent
f99ce9ed63
commit
2a70c381f7
|
@ -108,6 +108,7 @@ Discourse.UserAction = Discourse.Model.extend({
|
|||
mentionType: Em.computed.equal('action_type', UserActionTypes.mentions),
|
||||
isPM: Em.computed.or('messageSentType', 'messageReceivedType'),
|
||||
postReplyType: Em.computed.or('postType', 'replyType'),
|
||||
removableBookmark: Em.computed.and('bookmarkType', 'sameUser'),
|
||||
|
||||
addChild: function(action) {
|
||||
var groups = this.get("childGroups");
|
||||
|
|
|
@ -13,10 +13,9 @@
|
|||
<div class='child-actions'>
|
||||
<i class="icon {{unbound icon}}"></i>
|
||||
{{#grouped-each items}}
|
||||
{{#if bookmarkType}}
|
||||
{{#if removableBookmark}}
|
||||
<button class="btn btn-default remove-bookmark" {{action "removeBookmark" this}}>
|
||||
<i class="fa fa-times"></i>
|
||||
{{i18n "bookmarks.remove"}}
|
||||
{{fa-icon 'times'}} {{i18n "bookmarks.remove"}}
|
||||
</button>
|
||||
{{/if}}
|
||||
<a href="{{unbound userUrl}}" data-user-card="{{unbound username}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar this imageSize="tiny" extraClasses="actor" ignoreTitle="true"}}</div></a>
|
||||
|
|
Loading…
Reference in New Issue
Block a user