disable add button if user can not manage documents, fixes #2308

This commit is contained in:
j 2014-02-15 14:39:46 +00:00
parent 45c293ebec
commit 00cf921782

View file

@ -234,9 +234,12 @@ pandora.ui.documentsPanel = function(options) {
$itemMenu = Ox.MenuButton({ $itemMenu = Ox.MenuButton({
items: isItemView ? [ items: isItemView ? [
{id: 'add', title: Ox._( {
'Add Documents to {0}...', [pandora.site.itemName.singular] id: 'add',
), keyboard: 'control n'}, disabled: !pandora.site.capabilities.canManageDocuments[pandora.user.level],
title: Ox._('Add Documents to {0}...', [pandora.site.itemName.singular]),
keyboard: 'control n'
},
{}, {},
{id: 'open', title: '', keyboard: 'return'}, {id: 'open', title: '', keyboard: 'return'},
{id: 'edit', title: ''}, {id: 'edit', title: ''},