FIX: Moderators/Admins cannot delete other user's bookmarks

This commit is contained in:
Robin Ward 2014-10-24 16:08:31 -04:00
parent f99ce9ed63
commit 2a70c381f7
2 changed files with 3 additions and 3 deletions

View File

@ -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");

View File

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