dcs / role-core-bundle
DCSRoleCoreBundle 提供了角色管理的基本服务
dev-master / 1.0.x-dev
2016-12-31 09:12 UTC
Requires
- php: >=5.3.9
Requires (Dev)
- dcs/security-core-bundle: ~1.0@dev
- phpunit/phpcov: 3.*
- phpunit/phpunit: ^5
- satooshi/php-coveralls: ~1.0
- symfony/framework-bundle: ~2.8|~3.0
- symfony/security: ~2.8|~3.0
Suggests
- dcs/role-provider-array-bundle: Management of the roles having the configuration as an array
- dcs/role-provider-orm-bundle: Management of the roles using Doctrine ORM
This package is not auto-updated.
Last update: 2024-09-26 02:53:46 UTC
README
DCSRoleCoreBundle
此包提供角色管理的基本服务。它还提供在身份验证过程中设置默认用户角色的选项。
基本配置需要指定角色恢复的提供者。提供了两个提供者进行安装
DCSRoleProviderORMBundle 使用 Doctrine ORM 管理用户角色的提供者。
DCSRoleProviderArrayBundle 使用数组管理用户角色的提供者。
安装
先决条件
此包需要 DCSSecurityCoreBundle。
需要包
运行以下命令
$ composer require dcs/role-core-bundle "~1.0@dev"
Composer 将将包安装到您的项目目录 vendor/dcs/role-core-bundle
。
启用包
在内核中启用包
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new DCS\Role\CoreBundle\DCSRoleCoreBundle(),
// ...
);
}
配置
现在您已正确启用了此包,下一步是配置它以适应您应用程序的具体需求。
将以下配置添加到您的 config.yml
。
dcs_role_core:
provider: YOUR_PROVIDER_SERVICE
报告问题或功能请求
问题和功能请求在 Github issue tracker 中跟踪。