From 61680a1942b59b5bab09045c96ec25a5a70b43a3 Mon Sep 17 00:00:00 2001 From: liberhe <411497616@qq.com> Date: Fri, 15 Dec 2023 19:16:09 +0800 Subject: [PATCH] add approve auth --- src/main/java/com/dl/officialsite/login/AuthAspect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/dl/officialsite/login/AuthAspect.java b/src/main/java/com/dl/officialsite/login/AuthAspect.java index a7d8e089..41ad66b3 100644 --- a/src/main/java/com/dl/officialsite/login/AuthAspect.java +++ b/src/main/java/com/dl/officialsite/login/AuthAspect.java @@ -1,5 +1,6 @@ package com.dl.officialsite.login; +import com.dl.officialsite.common.exception.BizException; import com.dl.officialsite.common.exception.UnauthorizedException; import com.dl.officialsite.common.utils.UserSecurityUtils; import com.dl.officialsite.login.model.UserPrincipleData; @@ -36,7 +37,7 @@ public void authBefore(JoinPoint joinPoint, Auth auth) throws UnauthorizedExcept List team = userPrincipleData.getTeams().stream().filter(x-> x.getTeamId()==1).collect(Collectors.toList()); if(team == null || team.size()==0){ - throw new UnauthorizedException("Unauthorized access"); + throw new RuntimeException("Unauthorized access"); }