Project

General

Profile

Actions

Bug #99393

closed

You don't have access to this module - after deactivated "help" modules for editors

Added by Christian Hackl almost 2 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-12-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

TYPO3 11.x
PHP 8.1.x

If i deactivate the "help" modules for redakteur-be-group and if that user with this group logs in at the TYPO3 backend then he got error message:
503 You don't have access to this module ...

User settings selected:
After start: "First module at menu"

The first module in our case is the "dashboard" so I would expect that the user who logs in with these settings will see the dashboard and not an error message.


Files

error-message.JPG (41.2 KB) error-message.JPG Christian Hackl, 2022-12-19 11:25
group-settings.JPG (50.7 KB) group-settings.JPG Christian Hackl, 2022-12-19 11:25
user-setting.JPG (28.2 KB) user-setting.JPG Christian Hackl, 2022-12-19 11:25
typo3-error-2.png (81.3 KB) typo3-error-2.png Christian Hackl, 2022-12-19 11:29
Actions #1

Updated by Christian Hackl almost 2 years ago

(1/1) #1294586448 RuntimeException
Access Error: You don't have access to this module.

in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php line 431
if ($moduleName && !str_contains($conf['access'] ?? '', 'admin')) {
$acs = $this->check('modules', $moduleName);
}
if (!$acs) {
throw new \RuntimeException('Access Error: You don\'t have access to this module.', 1294586448);
}
// User has access (Otherwise an exception would haven been thrown)
return true;
}
at TYPO3\CMS\Core\Authentication\BackendUserAuthentication->modAccess()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Http/RouteDispatcher.php line 176 {
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface {
try {
$response = $handler->handle($request);
} catch (PropagateResponseException $e) {
$response = $e->getResponse();
}

$backendUserAuthentication = $GLOBALS['BE_USER'];
// Check permissions and exit if the user has no permission for entry
$backendUserAuthentication->modAccess($moduleConfiguration);
// '' for "no value found at all" to guarantee that the following if condition fails.
$id = $request->getQueryParams()['id'] ?? $request->getParsedBody()['id'] ?? '';
if (MathUtility::canBeInterpretedAsInteger($id) && $id > 0) {
$permClause = $backendUserAuthentication->getPagePermsClause(Permission::PAGE_SHOW);
at TYPO3\CMS\Backend\Http\RouteDispatcher->addAndValidateModuleConfiguration()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Http/RouteDispatcher.php line 72
// Ensure that a token exists, and the token is requested, if the route requires a valid token
$this->assertRequestToken($request, $route);
if ($route->hasOption('module')) {
$this->addAndValidateModuleConfiguration($request, $route);
// This module request (which is usually opened inside the list_frame)
// has been issued from a toplevel browser window (e.g. a link was opened in a new tab).
// Redirect to open the module as frame inside the TYPO3 backend layout.
at TYPO3\CMS\Backend\Http\RouteDispatcher->dispatch()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Http/RequestHandler.php line 110
// there are Core classes that need the Request object but do not get it handed in
$this->resetGlobalsToCurrentRequest($request);
try {
// Check if the router has the available route and dispatch.
return $this->dispatcher->dispatch($request);
} catch (MissingRequestTokenException $e) {
// When token was missing, then redirect to login, but keep the current route as redirect after login
$loginUrl = $this->uriBuilder->buildUriWithRedirect(
'login',
at TYPO3\CMS\Backend\Http\RequestHandler->handle()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Middleware/ResponsePropagation.php line 34

at TYPO3\CMS\Core\Middleware\ResponsePropagation->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}
at Psr\Http\Server\RequestHandlerInterface@anonymous.../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138$87->handle()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Middleware/SiteResolver.php line 69
}
$site = $this->siteMatcher->matchByPageId($pageId, $rootLine);
$request = $request->withAttribute('site', $site);
}
return $handler->handle($request);
}
}
at TYPO3\CMS\Backend\Middleware\SiteResolver->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172 {
$response = $handler->handle($request);
foreach ($GLOBALS['TYPO3_CONF_VARS']['BE']['HTTP']['Response']['Headers'] ?? [] as $header) {
[$headerName, $value] = explode(':', $header, 2);
$response = $response->withAddedHeader($headerName, trim($value));
}
at TYPO3\CMS\Backend\Middleware\AdditionalResponseHeaders->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172
if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}
at Psr\Http\Server\RequestHandlerInterface@anonymous.../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138$87->handle()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Middleware/OutputCompression.php line 47
ob_clean();
// Initialize output compression if configured
$this->initializeOutputCompression();
return $handler->handle($request);
}
/**
 * Initialize output compression if configured
at TYPO3\CMS\Backend\Middleware\OutputCompression->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172
if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}
at Psr\Http\Server\RequestHandlerInterface@anonymous.../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138$87->handle()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php line 165
}
$GLOBALS['LANG'] = $this->languageServiceFactory->createFromUserPreferences($GLOBALS['BE_USER']);
// Re-setting the user and take the workspace from the user object now
$this->setBackendUserAspect($GLOBALS['BE_USER']);
$response = $handler->handle($request);
$this->sessionGarbageCollection();
return $this->enrichResponseWithHeadersAndCookieInformation($response, $GLOBALS['BE_USER']);
}

at TYPO3\CMS\Backend\Middleware\BackendUserAuthenticator->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172

if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}
at Psr\Http\Server\RequestHandlerInterface@anonymous.../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138$87->handle()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php line 86
$uri = GeneralUtility::makeInstance(UriBuilder::class)->buildUriFromRoute('login');
return new RedirectResponse($uri);
}
return $handler->handle($request);
}
}
at TYPO3\CMS\Backend\Middleware\BackendRouteInitialization->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172
if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}
at Psr\Http\Server\RequestHandlerInterface@anonymous.../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138$87->handle()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Middleware/ForcedHttpsBackendRedirector.php line 55
[$server, $address] = explode('/', $url, 2);
return new RedirectResponse('https://' . $server . $sslPortSuffix . '/' . $address);
}
return $handler->handle($request);
}
}
at TYPO3\CMS\Backend\Middleware\ForcedHttpsBackendRedirector->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172
if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}
at Psr\Http\Server\RequestHandlerInterface@anonymous.../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138$87->handle()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Middleware/LockedBackendGuard.php line 75
$request->getAttribute('normalizedParams')->getRemoteAddress(),
trim((string)$GLOBALS['TYPO3_CONF_VARS']['BE']['IPmaskList'])
);
return $handler->handle($request);
}
/**
 * Check adminOnly configuration variable and redirects to an URL in file typo3conf/LOCK_BACKEND
at TYPO3\CMS\Backend\Middleware\LockedBackendGuard->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172 {
$request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request));
return $handler->handle($request);
}
}
at TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172
if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}
at Psr\Http\Server\RequestHandlerInterface@anonymous.../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138$87->handle()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Middleware/VerifyHostHeader.php line 55
1396795884
);
}
return $handler->handle($request);
}
/**
 * Checks if the provided host header value matches the trusted hosts pattern.
at TYPO3\CMS\Core\Middleware\VerifyHostHeader->process()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 172 {
return $this->tip->handle($request);
}
if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}
at Psr\Http\Server\RequestHandlerInterface@anonymous.../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php:138$87->handle()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 78
  • @return ResponseInterface
    */
    public function handle(ServerRequestInterface $request): ResponseInterface
/**
 * Seed the middleware stack with the inner request handler
at TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/AbstractApplication.php line 86
*/
public function handle(ServerRequestInterface $request): ResponseInterface {
try {
$response = $this->requestHandler->handle($request);
} catch (ImmediateResponseException $exception) {
$response = $exception->getResponse();
}
return $response;
at TYPO3\CMS\Core\Http\AbstractApplication->handle()
in .../typo3_src-11.5.19/typo3/sysext/backend/Classes/Http/Application.php line 72
$request = $request->withAttribute('applicationType', $applicationType);
// Set up the initial context
$this->initializeContext();
return parent::handle($request);
}
/**
 * Create a PSR-7 Response that redirects to the install tool
at TYPO3\CMS\Backend\Http\Application->handle()
in .../typo3_src-11.5.19/typo3/sysext/core/Classes/Http/AbstractApplication.php line 100 * @param callable $execute Deprecated, will be removed in TYPO3 v12.0
*/
final public function run(callable $execute = null) {
$response = $this->handle(ServerRequestFactory::fromGlobals());
if ($execute !== null) {
trigger_error('Custom execution of Application code will be removed in TYPO3 v12.0, use PSR-15 Middlewares instead.', E_USER_DEPRECATED);
$execute();
}
at TYPO3\CMS\Core\Http\AbstractApplication->run()
in .../typo3_src-11.5.19/typo3/index.php line 20
// Set up the application for the backend
call_user_func(static function () {
$classLoader = require dirname(DIR).'/vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
});
at {closure}()
in .../typo3_src-11.5.19/typo3/index.php line 21
call_user_func(static function () {
$classLoader = require dirname(DIR).'/vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_BE);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader)->get(\TYPO3\CMS\Backend\Http\Application::class)->run();
});
Actions #2

Updated by Georg Ringer almost 2 years ago

  • Subject changed from You don't have access to this module - after deactivated "help" modules for redakteurs to You don't have access to this module - after deactivated "help" modules for editors
Actions #3

Updated by Riccardo De Contardi 11 months ago

  • Status changed from New to Needs Feedback

Right now I am not able to reproduce it on version 12. Could you test it again on version 12 or add further details about how to reproduce it? E.g. a step-by-step guide?

Thank you.

Actions #4

Updated by Georg Ringer 5 months ago

  • Status changed from Needs Feedback to Closed

closed because lack of feedback. feel free to reopen a new issue if still valid! thanks a lot

Actions

Also available in: Atom PDF