fix:(2046-permission): 修复参数问题;更新权限检查接口
This commit is contained in:
parent
2386ff1179
commit
b5a99ddf33
@ -36,9 +36,7 @@ public class CheckIdentityPermissionReq {
|
||||
/**
|
||||
* 身份Id,不能为空
|
||||
*/
|
||||
@NotNull(message = "身份ID不能为空")
|
||||
private Long identityId;
|
||||
@NotNull(message = "身份类型不能为空")
|
||||
private IdentityType identityType;
|
||||
|
||||
/**
|
||||
|
||||
@ -14,15 +14,18 @@ import javax.validation.constraints.NotNull;
|
||||
@Data
|
||||
public class OUWorkspacePair {
|
||||
/** 工作台ID **/
|
||||
@NotNull
|
||||
@NotNull(message = "工作台ID不能为空")
|
||||
private Long workspaceId;
|
||||
/** 工作台类型 **/
|
||||
@NotNull
|
||||
|
||||
/** 工作台类型 - 直接依赖角色标签 不需要传了 **/
|
||||
@Deprecated
|
||||
private Integer workspaceType;
|
||||
|
||||
/** 企业组织ID **/
|
||||
@NotNull
|
||||
@NotNull(message = "OUId不能为空")
|
||||
private Long ouId;
|
||||
/** 参建类型 **/
|
||||
@NotNull
|
||||
|
||||
/** 参建类型 - 直接依赖角色标签 不需要传了 **/
|
||||
@Deprecated
|
||||
private Integer workspaceJoinType;
|
||||
}
|
||||
|
||||
@ -66,6 +66,11 @@ public class TyrSaasAuthController implements TyrSaasAuthApi {
|
||||
|
||||
@Override
|
||||
public ApiResult<Boolean> hasPermissionForIdentityV2(CheckIdentityPermissionReq req) {
|
||||
//单独做下参数校验
|
||||
if (req.getPersonId() == null
|
||||
&& (req.getIdentityId() == null || req.getIdentityType() == null)) {
|
||||
AssertUtil.fail("自然人ID和身份ID/Type不能同时为空");
|
||||
}
|
||||
return ApiResult.ok(tyrSaasAuthService.hasPermissionForIdentityV2(req));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user