fix(permission): 权限请求默认使用缓存
This commit is contained in:
parent
6b26fdc923
commit
2dbe9590ed
@ -62,8 +62,9 @@ public class IdentityAuthReq {
|
||||
/** 指定角色ID - 预览用,不需要用户已配置角色 **/
|
||||
private Set<Long> specifyRoleIds;
|
||||
|
||||
/** 是否使用缓存 **/
|
||||
private Boolean useCache;
|
||||
/** 是否使用缓存 - 默认true **/
|
||||
@Builder.Default
|
||||
private boolean useCache = true;
|
||||
|
||||
|
||||
@Data
|
||||
|
||||
@ -695,7 +695,7 @@ public class TyrSaasAuthServiceImpl implements TyrSaasAuthService {
|
||||
public IdentityAuthRes findIdentityAuthMix(IdentityAuthReq req) {
|
||||
List<IdentityAuthRes.WorkspacePermission> permissions = null;
|
||||
//不走缓存的情况:关闭缓存开关 - 缓存临时禁用 - 请求指明不走缓存 - 角色预览操作
|
||||
boolean notUseCache = BooleanUtil.isFalse(req.getUseCache())
|
||||
boolean notUseCache = !req.isUseCache()
|
||||
|| CollectionUtil.isNotEmpty(req.getSpecifyRoleIds())
|
||||
|| permissionCacheService.cacheDisable(
|
||||
PermissionCacheKey.builder()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user