Skip to content

Commit

Permalink
[Fix-1662] [admin] OpenApi notLoginException (#2470)
Browse files Browse the repository at this point in the history
Co-authored-by: wenmo <[email protected]>
  • Loading branch information
aiwenmo and aiwenmo authored Nov 1, 2023
1 parent cbd98dd commit 5525234
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,10 @@ public Boolean checkTenantAdmin(Integer id) {

@Override
public List<Role> getCurrentRole() {
return roleService.getRoleByUserId(StpUtil.getLoginIdAsInt());
if (StpUtil.isLogin()) {
return roleService.getRoleByUserId(StpUtil.getLoginIdAsInt());
}
return new ArrayList<>();
}

@Override
Expand Down

0 comments on commit 5525234

Please sign in to comment.