From 9593b42106ce39127d1912304763ec18db20f30f Mon Sep 17 00:00:00 2001 From: Ingo Renner Date: Sat, 26 Jan 2008 16:29:39 +0000 Subject: [PATCH] fixed bug #7283: When editing a shortcut in backend.php regular users get global groups shown in the group select field but can't save to them git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2971 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 1 + typo3/classes/class.shortcutmenu.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec4dd63b16cc..1a6465284f59 100755 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ * fixed bug #7255: implement "auto-closing brackets", credits Tobias Liebig * fixed bug: when refreshing the module menu, the currently highlighted module losses highlighting * added visual effects to collapsing/expanding module menus + * fixed bug #7283: When editing a shortcut in backend.php regular users get global groups shown in the group select field but can't save to them 2008-01-26 Oliver Hader diff --git a/typo3/classes/class.shortcutmenu.php b/typo3/classes/class.shortcutmenu.php index 825d292797f5..b87fabdd0d57 100644 --- a/typo3/classes/class.shortcutmenu.php +++ b/typo3/classes/class.shortcutmenu.php @@ -409,10 +409,17 @@ class ShortcutMenu implements backend_toolbarItem { * @return void */ public function getAjaxShortcutGroups($params = array(), TYPO3AJAX &$ajaxObj = null) { + $shortcutGroups = $this->shortcutGroups; - //TODO remove global (negative id) groups if the user is no admin !!! + if(!$GLOBALS['BE_USER']->isAdmin()) { + foreach($shortcutGroups as $groupId => $groupName) { + if(intval($groupId) < 0) { + unset($shortcutGroups[$groupId]); + } + } + } - $ajaxObj->addContent('shortcutGroups', $this->shortcutGroups); + $ajaxObj->addContent('shortcutGroups', $shortcutGroups); $ajaxObj->setContentFormat('json'); } -- 2.20.1