修复:项目查看权限

This commit is contained in:
gxwebsoft
2024-01-15 21:31:14 +08:00
parent a64e9cbe05
commit 91ea7ed594
@@ -75,7 +75,7 @@ public class AppController extends BaseController {
@GetMapping("/{id}")
public ApiResult<App> get(@PathVariable("id") Integer id) {
final User loginUser = getLoginUser();
if (!CommonUtil.hasRole(loginUser.getRoles(),"superAdmin") || !CommonUtil.hasRole(loginUser.getRoles(),"admin")) {
if (!CommonUtil.hasRole(loginUser.getRoles(),"superAdmin") && !CommonUtil.hasRole(loginUser.getRoles(),"admin")) {
// 查询权限
if (appUserService.count(new LambdaQueryWrapper<AppUser>().eq(AppUser::getUserId, getLoginUserId()).eq(AppUser::getAppId,id)) == 0) {
return fail("无查看权限",null);