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