|
4 | 4 |
|
5 | 5 | use think\Facade;
|
6 | 6 |
|
| 7 | + |
7 | 8 | /**
|
8 | 9 | * @see \Casbin\Enforcer
|
| 10 | + * @package tauthz\facade |
| 11 | + * @mixin \Casbin\Enforcer |
| 12 | + * @method mixed enforce(string $subject,string $object,string $action) static 权限检查 |
| 13 | + * @method mixed addPolicy(string $subject,string $object,string $action) static 当前策略添加授权规则 |
| 14 | + * @method mixed hasPolicy(string $subject,string $object,string $action) static 确定是否存在授权规则 |
| 15 | + * @method mixed removePolicy(string $subject,string $object,string $action) static 当前策略移除授权规则 |
| 16 | + * @method mixed getRolesForUser(string $username) static 获取用户具有的角色 |
| 17 | + * @method mixed getUsersForRole(string $role) static 获取具有角色的用户 |
| 18 | + * @method mixed hasRoleForUser(string $username, string $role) static 确定用户是否具有角色 |
| 19 | + * @method mixed addRoleForUser(string $username, string $role) static 为用户添加角色 |
| 20 | + * @method mixed deleteRoleForUser(string $username, string $role) static 删除用户的角色 |
| 21 | + * @method mixed deleteRolesForUser(string $username) static 删除用户的所有角色 |
| 22 | + * @method mixed deleteUser(string $username) static 删除一个用户 |
| 23 | + * @method mixed deleteRole(string $role) static 删除一个角色 |
| 24 | + * @method mixed deletePermission(string $policy) static 删除权限 |
| 25 | + * @method mixed addPermissionForUser(string $username,string $policy) static 为用户或角色添加权限 |
| 26 | + * @method mixed deletePermissionForUser(string $username,string $policy) static 删除用户或角色的权限 |
| 27 | + * @method mixed deletePermissionsForUser(string $username) static 删除用户或角色的权限 |
| 28 | + * @method mixed getPermissionsForUser(string $username) static 获取用户或角色的权限 |
| 29 | + * @method mixed hasPermissionForUser(string $username,string $policy) static 确定用户是否具有权限 |
| 30 | + * @method mixed getImplicitRolesForUser(string $username) static 获取用户具有的隐式角色 |
| 31 | + * @method mixed getImplicitPermissionsForUser(string $username) static 获取用户具有的隐式角色 |
9 | 32 | */
|
10 | 33 | class Enforcer extends Facade
|
11 | 34 | {
|
|
0 commit comments