Skip to content

Commit

Permalink
add approve auth
Browse files Browse the repository at this point in the history
  • Loading branch information
liberhe committed Dec 15, 2023
1 parent 973f325 commit 61680a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/dl/officialsite/login/AuthAspect.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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");
}


Expand Down

0 comments on commit 61680a1

Please sign in to comment.