From: Matthias Schmidt Date: Thu, 21 Jul 2016 15:42:15 +0000 (+0200) Subject: Only show media buttons if user has permission to use media X-Git-Tag: 3.0.0_Beta_1~1015 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=41d1a7ea503f478e75b76a0d8a4b56f98c5a4022;p=GitHub%2FWoltLab%2FWCF.git Only show media buttons if user has permission to use media --- diff --git a/com.woltlab.wcf/templates/wysiwygToolbar.tpl b/com.woltlab.wcf/templates/wysiwygToolbar.tpl index 706de87217..c1e4fcc367 100644 --- a/com.woltlab.wcf/templates/wysiwygToolbar.tpl +++ b/com.woltlab.wcf/templates/wysiwygToolbar.tpl @@ -57,7 +57,9 @@ buttons.push('table'); buttons.push('wcfSeparator'); -buttons.push('woltlabMedia'); +{if $__wcf->session->getPermission('admin.content.cms.canUseMedia')} + buttons.push('woltlabMedia'); +{/if} buttons.push('woltlabQuote'); {foreach from=$__wcf->getBBCodeHandler()->getButtonBBCodes(true) item=__bbcode} diff --git a/wcfsetup/install/files/acp/templates/wysiwygToolbar.tpl b/wcfsetup/install/files/acp/templates/wysiwygToolbar.tpl index d0f180fcbe..c1e4fcc367 100644 --- a/wcfsetup/install/files/acp/templates/wysiwygToolbar.tpl +++ b/wcfsetup/install/files/acp/templates/wysiwygToolbar.tpl @@ -53,13 +53,13 @@ buttons.push('alignment'); {if $__wcf->getBBCodeHandler()->isAvailableBBCode('img')} buttons.push('woltlabImage'); {/if} -{if $__wcf->getBBCodeHandler()->isAvailableBBCode('table')} - buttons.push('table'); -{/if} +buttons.push('table'); buttons.push('wcfSeparator'); -buttons.push('woltlabMedia'); +{if $__wcf->session->getPermission('admin.content.cms.canUseMedia')} + buttons.push('woltlabMedia'); +{/if} buttons.push('woltlabQuote'); {foreach from=$__wcf->getBBCodeHandler()->getButtonBBCodes(true) item=__bbcode}