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