diff --git a/test/model/group/getprivs.php b/test/model/group/getprivs.php index 300e6e14b5..9771e58431 100644 --- a/test/model/group/getprivs.php +++ b/test/model/group/getprivs.php @@ -10,8 +10,22 @@ title=测试 groupModel->getPrivs(); cid=1 pid=1 +测试查询不存在的分组是否具有 action 模块 editComment 的权限 >> 0 +测试查询分组 10 是否具有 action 模块 editComment 的权限 >> editComment +测试查询分组 10 是否具有 user 模块 bug 的权限 >> bug +测试查询分组 10 是否具有 trainplan 模块 view 的权限 >> view +测试查询分组 10 是否具有 trainplan 模块 create 的权限 >> +测试查询分组 2 是否具有 trainplan 模块 create 的权限 >> create +测试查询分组 2 是否具有 todo 模块 activate 的权限 >> activate + */ $group = new groupTest(); -r($group->getPrivsTest()) && p() && e(); \ No newline at end of file +r($group->getPrivsTest(100)) && p('action:editComment') && e(0); //测试查询不存在的分组是否具有 action 模块 editComment 的权限 +r($group->getPrivsTest(10)) && p('action:editComment') && e('editComment'); //测试查询分组 10 是否具有 action 模块 editComment 的权限 +r($group->getPrivsTest(10)) && p('user:bug') && e('bug'); //测试查询分组 10 是否具有 user 模块 bug 的权限 +r($group->getPrivsTest(10)) && p('trainplan:view') && e('view'); //测试查询分组 10 是否具有 trainplan 模块 view 的权限 +r($group->getPrivsTest(10)) && p('trainplan:create') && e(''); //测试查询分组 10 是否具有 trainplan 模块 create 的权限 +r($group->getPrivsTest(2)) && p('trainplan:create') && e('create'); //测试查询分组 2 是否具有 trainplan 模块 create 的权限 +r($group->getPrivsTest(2)) && p('todo:activate') && e('activate'); //测试查询分组 2 是否具有 todo 模块 activate 的权限