Skip to content

Commit

Permalink
[TASK] Clean up workspace preview top bar
Browse files Browse the repository at this point in the history
The preview controller is now not attached to the backend module anymore,
as the Preview functionality ("Split Bar on top") is technically a completely
separate backend preview and completely unrelated to the workspaces
Backend Module.

This change also removes several hacks to generate Backend URLs.

Resolves: #84074
Releases: master
Change-Id: Id0ce7093f6d3ac94c8e4a9cfecd78027d26d45df
Reviewed-on: https://review.typo3.org/55931
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Daniel Gorges <daniel.gorges@b13.de>
Tested-by: Daniel Gorges <daniel.gorges@b13.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
bmack committed Mar 1, 2018
1 parent 6f600d3 commit a0787e3
Show file tree
Hide file tree
Showing 17 changed files with 347 additions and 433 deletions.
165 changes: 0 additions & 165 deletions typo3/sysext/workspaces/Classes/Controller/AbstractController.php

This file was deleted.

Expand Up @@ -18,6 +18,7 @@
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Http\JsonResponse;
use TYPO3\CMS\Core\Type\Bitmask\Permission;

/**
* Implements the AJAX functionality for the various asynchronous calls
Expand Down Expand Up @@ -50,7 +51,7 @@ public function switchWorkspaceAction(ServerRequestInterface $request): Response
' AND pages.t3ver_wsid IN (0, ' . $workspaceId . ')'
);
if ($page) {
if ($this->getBackendUser()->doesUserHaveAccess($page, 1)) {
if ($this->getBackendUser()->doesUserHaveAccess($page, Permission::PAGE_SHOW)) {
break;
}
} else {
Expand Down

0 comments on commit a0787e3

Please sign in to comment.