Fixed bug #15048: Workspaces: Autopublication task has too many rights
authorFrancois Suter <francois.suter@typo3.org>
Thu, 19 Aug 2010 09:01:21 +0000 (09:01 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Thu, 19 Aug 2010 09:01:21 +0000 (09:01 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8608 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/version/ws/class.wslib.php

index 413d5eb..7aa74d6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-19  Francois Suter  <francois@typo3.org>
+
+       * Fixed bug #15048: Workspaces: Autopublication task has too many rights
+
 2010-08-16 Steffen Kamper  <steffen@typo3.org>
 
        * Follow-up to #15437: Refactor of recycler - fix of CheckboxSelectionModel
index dea0c67..867cb4d 100755 (executable)
@@ -200,7 +200,9 @@ class wslib {
        function autoPublishWorkspaces()        {
                global $TYPO3_CONF_VARS;
 
-                       // Temporarily set high power...
+                       // Temporarily set admin rights
+                       // FIXME: once workspaces are cleaned up a better solution should be implemented
+               $currentAdminStatus = $GLOBALS['BE_USER']->user['admin'];
                $GLOBALS['BE_USER']->user['admin'] = 1;
 
                        // Select all workspaces that needs to be published / unpublished:
@@ -229,6 +231,9 @@ class wslib {
                        $tce->start(array(),$cmd);
                        $tce->process_cmdmap();
                }
+
+                       // Restore admin status
+               $GLOBALS['BE_USER']->user['admin'] = $currentAdminStatus;
        }
 }