feat(通用接口): 添加通过人查询权限的数据定义
This commit is contained in:
parent
7829278295
commit
36c49119d6
@ -12,18 +12,45 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 权限集作用范围
|
||||
* 权限相关接口
|
||||
*/
|
||||
@FeignClient(name = "tyr", url = "${axzo.service.tyr:http://tyr:8080}")
|
||||
public interface TyrSaasAuthApi {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 判断人是否拥有指定权限。
|
||||
* 不包括产品分组及标准角等,只是暂时版本切换时提供给工作台报表权限使用,20203/10/13后业务方不要调用该接口
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
@PostMapping("/api/v1/auth/hasPermissionForIdentity")
|
||||
ApiResult<Boolean> hasPermissionForIdentity(@RequestBody CheckIdentityPermissionReq req);
|
||||
|
||||
/**
|
||||
*
|
||||
* 查询人的权限。
|
||||
* 不包括产品分组及标准角等,只是暂时版本切换时提供给工作台报表权限使用,20203/10/13后业务方不要调用该接口
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/v1/auth/listPermissionFromIdentity")
|
||||
@Deprecated
|
||||
ApiResult<List<QueryIdentityByPermissionResp>> listPermissionFromIdentity(@RequestBody ListPermissionFromIdentityReq req);
|
||||
|
||||
/**
|
||||
* 查询拥有权限的人。
|
||||
* 不包括产品分组及标准角等,只是暂时版本切换时提供给工作台报表权限使用,20203/10/13后业务方不要调用该接口
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/api/v1/auth/listPermissionFromFeature")
|
||||
@Deprecated
|
||||
ApiResult<List<QueryIdentityByPermissionResp>> listPermissionFromFeature(@RequestBody ListPermissionFromFeatureReq req);
|
||||
|
||||
//------------------上面权限接口为2023/10月未上线前提供的接口,在此日期之后(含)的接口统一使用下面的接口---------------------------
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
package cn.axzo.tyr.client.model.req;
|
||||
|
||||
import cn.axzo.tyr.client.model.enums.IdentityType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author tanjie@axzo.cn
|
||||
* @date 2023/10/13 15:23
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class IdentityAuthReq {
|
||||
|
||||
private Long identityId;
|
||||
private IdentityType identityType;
|
||||
private List<WorkspaceAndOu> workspaceAndOus;
|
||||
private String terminal;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
static class WorkspaceAndOu {
|
||||
private Long workspaceId;
|
||||
private Long ouId;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,58 @@
|
||||
package cn.axzo.tyr.client.model.res;
|
||||
|
||||
import cn.axzo.tyr.client.model.BaseWorkspaceModel;
|
||||
import cn.axzo.tyr.client.model.enums.FeatureType;
|
||||
import cn.axzo.tyr.client.model.enums.IdentityType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author tanjie@axzo.cn
|
||||
* @date 2023/10/13 14:44
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class IdentityAuthRes {
|
||||
private Long identity;
|
||||
private IdentityType identityType;
|
||||
private List<WorkspacePermission> permissions;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
static class WorkspacePermission {
|
||||
|
||||
private Long workspaceId;
|
||||
|
||||
private Long ouId;
|
||||
|
||||
private boolean isSuperAdmin;
|
||||
|
||||
private List<PermissionPoint> permissionPoint;
|
||||
|
||||
|
||||
}
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
static class PermissionPoint {
|
||||
private Long featureId;
|
||||
|
||||
private Long featureCode;
|
||||
|
||||
private FeatureType featureType;
|
||||
|
||||
private String terminal;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user