Skip to content

Commit 23766ea

Browse files
authored
Merge pull request #9 from Tinywan/master
Enforcer add Facade Container
2 parents a1bbf4e + 6bc8a70 commit 23766ea

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/facade/Enforcer.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,31 @@
44

55
use think\Facade;
66

7+
78
/**
89
* @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 获取用户具有的隐式角色
932
*/
1033
class Enforcer extends Facade
1134
{

0 commit comments

Comments
 (0)