From 5eb9ad65882e57bbb4113899a82feacf289c9d1b Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 29 Sep 2016 10:24:08 +0200 Subject: [PATCH] Add missing permission checks in media manager --- .../files/js/WoltLabSuite/Core/Media/Manager/Base.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Base.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Base.js index e34b94c04a..bdea218138 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Base.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Media/Manager/Base.js @@ -98,7 +98,9 @@ define( */ _dialogClose: function() { // only show media clipboard if editor is open - Clipboard.hideEditor('com.woltlab.wcf.media'); + if (Permission.get('admin.content.cms.canManageMedia')) { + Clipboard.hideEditor('com.woltlab.wcf.media'); + } }, /** @@ -187,7 +189,9 @@ define( if (!this._mediaManagerMediaList) return; // only show media clipboard if editor is open - Clipboard.showEditor('com.woltlab.wcf.media'); + if (Permission.get('admin.content.cms.canManageMedia')) { + Clipboard.showEditor('com.woltlab.wcf.media'); + } }, /** -- 2.20.1