aryehraber/statamic-impersonator
最新稳定版本:v2.6.0
Composer 安装命令:
composer require aryehraber/statamic-impersonator
包简介
Give Admins the ability to authenticate as any user for easier debugging.
README 文档
README
Note
This addon has been archived since impersonating users was added to Statamic core in v4.23.0
Impersonator
Give Admins the ability to authenticate as any user for easier debugging.
Installation
Install the addon via composer:
composer require aryehraber/statamic-impersonator
Publish the config file (optional):
php please vendor:publish --tag=impersonator-config
After installation, all Super Admins will see a new Impersonator utility listed under Tools > Utilities. Regular CP users can also be given access, but will require the "Impersonator" permission to be activated for their User Role.
Usage
Simply navigate to Tools > Utilities > Impersonator, select the user that you want to authenticate as and click "Go". This will authenticate you as the selected user and automatically redirect you to the CP Dashboard, or the Homepage if the user doesn't have CP access.
You are now free to do what you need as this user to debug or give support regarding an issue.
Once finished, you can easily return back to your own account by clicking the "Back to my account" link:
- CP: a link can be found in the sidebar nav.
- Frontend: a small icon should appear in the bottom right corner (only if
inject_terminate_linkis set totrue).
If either of these doesn't work as expected, you should manually log out and log back in as yourself.
Tags
{{ impersonator:active }}
This tag allows you to check whether the current user is in an active Impersonation session, this can be useful to conditionally show/hide content.
Examples:
Show the terminate link to Impersonators only:
{{ if {impersonator:active} }}
<a href="{{ impersonator:terminate }}">Head Back</a>
{{ /if }}
Hide sensitive information from Impersonators:
{{ unless {impersonator:active} }}
<p>Personal user info</p>
{{ /unless }}
{{ impersonator:terminate }}
This tag outputs the action URL to terminate the Impersonation session, this can be useful if the inject_terminate_link config option has been set to false.
Security
If you discover any security-related issues, please email aryeh.raber@gmail.com instead of using the issue tracker.
aryehraber/statamic-impersonator 适用场景与选型建议
aryehraber/statamic-impersonator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 92.68k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2020 年 03 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Authentication」 「statamic」 「impersonator」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 aryehraber/statamic-impersonator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aryehraber/statamic-impersonator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 aryehraber/statamic-impersonator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
GraphQL authentication for your headless Craft CMS applications.
Easily impersonate another user for debugging purpose
Laravel middleware to restrict a site or specific routes using HTTP basic authentication
Statamic Fine Seo addon
统计信息
- 总下载量: 92.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 34
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-31