Commit f21e9662 authored by Guido Schmechel's avatar Guido Schmechel Committed by Frank Nägler
Browse files

[BUGFIX] Make edit button visible for admin

If user is logged in as admin, the edit buttons are always displayed.

Resolves: #86277
Releases: master
Change-Id: I80f96df09c2f4fab886e03cf5aa4cb91cb1bf06c
Reviewed-on: https://review.typo3.org/58296

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Richard Haeser's avatarRichard Haeser <richard@maxserv.com>
Reviewed-by: default avatarTobi Kretschmann <tobi@tobishome.de>
Tested-by: default avatarTobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
parent 50ae1a0a
......@@ -1188,6 +1188,9 @@ class PageLayoutController
*/
protected function isPageEditable(): bool
{
if ($this->getBackendUser()->isAdmin()) {
return true;
}
return !$this->pageinfo['editlock'] && $this->getBackendUser()->doesUserHaveAccess($this->pageinfo, Permission::PAGE_EDIT);
}
......@@ -1208,6 +1211,9 @@ class PageLayoutController
*/
protected function isContentEditable(): bool
{
if ($this->getBackendUser()->isAdmin()) {
return true;
}
return !$this->pageinfo['editlock'] && $this->getBackendUser()->doesUserHaveAccess($this->pageinfo, Permission::CONTENT_EDIT);
}
......
......@@ -4478,6 +4478,9 @@ class PageLayoutView implements LoggerAwareInterface
*/
protected function isPageEditable()
{
if ($this->getBackendUser()->isAdmin()) {
return true;
}
return !$this->pageinfo['editlock'] && $this->getBackendUser()->doesUserHaveAccess($this->pageinfo, Permission::PAGE_EDIT);
}
......@@ -4488,6 +4491,9 @@ class PageLayoutView implements LoggerAwareInterface
*/
protected function isContentEditable()
{
if ($this->getBackendUser()->isAdmin()) {
return true;
}
return !$this->pageinfo['editlock'] && $this->getBackendUser()->doesUserHaveAccess($this->pageinfo, Permission::CONTENT_EDIT);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment