fixed bug #7587: Accesscheck for Workspaceselector, credits Steffen Kamper
authorIngo Renner <ingo.renner@typo3.org>
Fri, 22 Feb 2008 18:47:31 +0000 (18:47 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Fri, 22 Feb 2008 18:47:31 +0000 (18:47 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3255 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/classes/class.workspaceselector.php

index 894facd..bfcc272 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-22  Ingo Renner  <ingo@typo3.org>
+
+       * fixed bug #7587: Accesscheck for Workspaceselector, credits Steffen Kamper
+
 2008-02-22  Benjamin Mack  <mack@xnos.org>
 
        * Fixed bug #7445: Malformed translated locallang causes PHP crash (thanks to Francois Suter)
index 93804e4..93747c3 100644 (file)
@@ -60,11 +60,14 @@ class WorkspaceSelector implements backend_toolbarItem {
        /**
         * checks whether the user has access to this toolbar item
         *
+        * @see         typo3/alt_shortcut.php
         * @return  boolean  true if user has access, false if not
         */
        public function checkAccess() {
-                       // FIXME - needs proper access check
-               return true;
+               $MCONF = array();
+               include('mod/user/ws/conf.php');
+
+               return $GLOBALS['BE_USER']->modAccess(array('name' => 'user', 'access' => 'user,group'), false) && $GLOBALS['BE_USER']->modAccess($MCONF, false);
        }
 
        /**