FIX: Don't show moderation history option to TL4

This commit is contained in:
Robin Ward 2017-12-26 16:56:14 -05:00
parent 89d1107f81
commit 6cffbb4ea4
2 changed files with 8 additions and 6 deletions

View File

@ -16,7 +16,7 @@ export function buildManageButtons(attrs, currentUser) {
} }
let contents = []; let contents = [];
if (attrs.canManage) { if (currentUser.staff) {
contents.push({ contents.push({
icon: 'list', icon: 'list',
label: 'admin.flags.moderation_history', label: 'admin.flags.moderation_history',

View File

@ -185,11 +185,13 @@ export default createWidget('topic-admin-menu', {
label: isPrivateMessage ? 'actions.make_public' : 'actions.make_private' }); label: isPrivateMessage ? 'actions.make_public' : 'actions.make_private' });
} }
buttons.push({ if (this.currentUser.get('staff')) {
action: 'showModerationHistory', buttons.push({
icon: 'list', action: 'showModerationHistory',
fullLabel: 'admin.flags.moderation_history' icon: 'list',
}); fullLabel: 'admin.flags.moderation_history'
});
}
const extraButtons = applyDecorators(this, 'adminMenuButtons', this.attrs, this.state); const extraButtons = applyDecorators(this, 'adminMenuButtons', this.attrs, this.state);