liquidlight/typo3-elevate-to-admin
Composer 安装命令:
composer require liquidlight/typo3-elevate-to-admin
包简介
Allow users to elevate themselves to admin if they have permission to do so
README 文档
README
A TYPO3 extension that removes permanent admin access and lets users elevate to admin only when needed.
Admin users log in without admin privileges. Not only does this satisfy cyber security accreditations*, it allows your admin users to use the website as Editors which means they can quickly see any permissions or UI Bugs, issues and errors
Features
- Meets Cyber Essentials and ISO 27001 requirements*
- See who is an admin and since when
- Resets privileges after 10 minutes of inactivity
- Clears admin privileges after logging out
- Allows admins to sill log in when backend is locked for editors
Installation
composer require liquidlight/typo3-elevate-to-admin- Edit backend users and enable "Can elevate to admin" where appropriate (existing admins will have this enabled when they login )
- Selected users can use the dropdown in the corner to elevate to admin
The user can exit admin mode by using the same dropdown.
How It Works
- Login as regular user - Admin users log in without admin privileges
- Work normally - Browse, edit content, and perform regular tasks
- Elevate when needed - Click the dropdown to become admin for specific tasks
- Auto-logout - Admin privileges automatically expire after 10 minutes of inactivity
Events
The extension dispatches PSR-14 events that allow you to customize the behaviour:
BeforeAdminElevationProcessEvent
This event is dispatched before the admin elevation processing begins. You can use it to skip the elevation process entirely based on custom conditions.
Example: Make everyone admin in development mode
<?php namespace MyVendor\MyExtension\EventListener; use LiquidLight\ElevateToAdmin\Event\BeforeAdminElevationProcessEvent; use LiquidLight\ElevateToAdmin\Traits\AdminElevationTrait; use TYPO3\CMS\Core\Core\Environment; final class DevModeAdminListener { use AdminElevationTrait; public function __invoke(BeforeAdminElevationProcessEvent $event): void { if (Environment::getContext()->isDevelopment()) { $user = $event->getBackendUser(); // Make user admin if they can elevate and aren't already admin if ($this->canUserElevate($user) && !$user->isAdmin()) { $this->setAdminElevation((int)$user->user['uid']); } // Skip normal processing since we've handled it $event->skipProcessing(); } } }
Register the event listener in Configuration/Services.yaml:
services: MyVendor\MyExtension\EventListener\DevModeAdminListener: tags: - name: event.listener identifier: 'dev-mode-admin' event: LiquidLight\ElevateToAdmin\Event\BeforeAdminElevationProcessEvent
Testing
This extension includes comprehensive unit and functional tests with database integration.
Unit Tests
Unit tests can be run with
composer i
composer test-unit
Functional Tests
Unit tests can be run with
composer i
composer test-functional
* Cybersecurity requirements
Please check to ensure elevation/re-authentication is acceptable for your require security practices and accreditations. After our research, we have found:
Cyber Essentials
The official requirement states "use separate accounts to perform administrative activities only" - but this is ambiguous. It could mean:
- Separate user accounts (strict interpretation)
- Separate administrative sessions/activities (flexible interpretation allowing elevation)
Problem: Some certification bodies explicitly state that "account separation" is mandatory and that privilege elevation methods don't meet requirements, while others may accept properly implemented elevation.
Recommendation: Check with your specific certification body, as interpretations vary.
ISO 27001:2022
More flexible approach. The updated standard "does not explicitly require a different user ID for privileged access" and "emphasises the need to re-authenticate prior to receiving privileged access rights."
Elevation with re-authentication is acceptable if it includes:
- Proper re-authentication before privilege escalation
- Session separation and logging
- Clear audit trails
Bottom Line
- Cyber Essentials: Unclear - depends on your certification body's interpretation
- ISO 27001:2022: Elevation with proper controls is acceptable
Sources
- NCSC Cyber Essentials Requirements: Official Documentation v3.2
- ISO 27001:2022 Control 8.2: Implementation Guidance
- Cyber Essentials Overview: NCSC Website
Always verify requirements with your certification body before implementation
liquidlight/typo3-elevate-to-admin 适用场景与选型建议
liquidlight/typo3-elevate-to-admin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 09 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 liquidlight/typo3-elevate-to-admin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 liquidlight/typo3-elevate-to-admin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2025-09-12
