open20/amos-privileges

本包最新版本(1.3.1)没有提供许可证信息。

AMOS权限管理插件(角色、权限、域等)

1.3.1 2023-05-23 11:18 UTC

README

Amos权限模块

这个仓库是做什么用的?

该仓库用于允许具有管理员角色的用户查看和管理用户权限(rbac角色和权限以及自定义权限,如存在cwh)

如何设置?

使用composer下载,添加到你的composer.json文件中

"open20/amos-privileges": "dev-master",

在modules-amos.php中启用权限模块,添加

'privileges' => [
    'class' => 'open20\amos\privileges\AmosPrivileges',
]

将权限迁移添加到控制台模块(console/config/migrations-amos.php)

'@vendor/open20/amos-privileges/src/migrations',

可以覆盖一些模块属性

/**
 * @var array roles that must not be considered by Privileges module
 */
public $blackListRoles = ['AMMINISTRATORE_CRTT'];
/**
 * @var array if set, consider only the roles in this list
 */
public $whiteListRoles = [];
/**
 * @var array array of modules for which privileges are not considered
 */
public $blackListModules = ['inforeq'];
/**
 * @var array list of platform roles (not from a single plugin) - override this if necessary
 */
public $platformRoles = ['ADMIN', 'BASIC_USER'];

覆盖第一个属性的示例

'privileges' => [
    'class' => 'open20\amos\privileges\AmosPrivileges',
    'blackListRoles' => [ 'ROLEA' , 'ROLEB' ]
]