Merge remote-tracking branch 'origin/feature/REQ-2046' into feature/REQ-2046
This commit is contained in:
commit
4b1d49f1a9
@ -62,8 +62,9 @@ public class IdentityAuthReq {
|
|||||||
/** 指定角色ID - 预览用,不需要用户已配置角色 **/
|
/** 指定角色ID - 预览用,不需要用户已配置角色 **/
|
||||||
private Set<Long> specifyRoleIds;
|
private Set<Long> specifyRoleIds;
|
||||||
|
|
||||||
/** 是否使用缓存 **/
|
/** 是否使用缓存 - 默认true **/
|
||||||
private Boolean useCache;
|
@Builder.Default
|
||||||
|
private boolean useCache = true;
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@ -177,7 +177,7 @@ public class SaasFeature extends BaseEntity<SaasFeature> implements Serializable
|
|||||||
return Collections.emptySet();
|
return Collections.emptySet();
|
||||||
}
|
}
|
||||||
return StrUtil.split(this.path, "/").stream()
|
return StrUtil.split(this.path, "/").stream()
|
||||||
.filter(id -> StrUtil.equals(id, "0"))
|
.filter(x -> StrUtil.isNotBlank(x) && !StrUtil.equals(x, "0"))
|
||||||
.map(Long::valueOf)
|
.map(Long::valueOf)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -696,7 +696,7 @@ public class TyrSaasAuthServiceImpl implements TyrSaasAuthService {
|
|||||||
public IdentityAuthRes findIdentityAuthMix(IdentityAuthReq req) {
|
public IdentityAuthRes findIdentityAuthMix(IdentityAuthReq req) {
|
||||||
List<IdentityAuthRes.WorkspacePermission> permissions = null;
|
List<IdentityAuthRes.WorkspacePermission> permissions = null;
|
||||||
//不走缓存的情况:关闭缓存开关 - 缓存临时禁用 - 请求指明不走缓存 - 角色预览操作
|
//不走缓存的情况:关闭缓存开关 - 缓存临时禁用 - 请求指明不走缓存 - 角色预览操作
|
||||||
boolean notUseCache = BooleanUtil.isFalse(req.getUseCache())
|
boolean notUseCache = !req.isUseCache()
|
||||||
|| CollectionUtil.isNotEmpty(req.getSpecifyRoleIds())
|
|| CollectionUtil.isNotEmpty(req.getSpecifyRoleIds())
|
||||||
|| permissionCacheService.cacheDisable(
|
|| permissionCacheService.cacheDisable(
|
||||||
PermissionCacheKey.builder()
|
PermissionCacheKey.builder()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user