Move "submanage" Session value into own methods

This commit is contained in:
Philipp 2022-10-21 19:33:28 +02:00
parent cafb23f8f0
commit 44a9683008
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
8 changed files with 37 additions and 11 deletions

View file

@ -63,7 +63,7 @@ abstract class BaseAdmin extends BaseModule
throw new HTTPException\ForbiddenException(DI::l10n()->t('You don\'t have access to administration pages.'));
}
if (!empty($_SESSION['submanage'])) {
if (DI::userSession()->getSubManagedUserId()) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Submanaged account can\'t access the administration pages. Please log back in as the main account.'));
}
}