Only show media buttons if user has permission to use media
authorMatthias Schmidt <gravatronics@live.com>
Thu, 21 Jul 2016 15:42:15 +0000 (17:42 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 21 Jul 2016 15:42:15 +0000 (17:42 +0200)
com.woltlab.wcf/templates/wysiwygToolbar.tpl
wcfsetup/install/files/acp/templates/wysiwygToolbar.tpl

index 706de872178deb65ce764eb97c53b57407e6098b..c1e4fcc367fb3d4566e679456c2f2d753c47990b 100644 (file)
@@ -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}
index d0f180fcbe51ec04214ad843bf7415e4e590588a..c1e4fcc367fb3d4566e679456c2f2d753c47990b 100644 (file)
@@ -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}