获取权限组列表
请求地址 | https://open.hrsaas.com/api/payroll/securityGroups |
---|---|
返回格式 | JSON |
content-type | application/json |
请求方式 | GET |
请求参数 | QUERY 参数 |
请求举例 | https://open.hrsaas.com/api/payroll/securityGroups ?offset=0&limit=10&orderby=id asc |
备注 | 为了便于识别,url做过decode,提交时需要url encode |
请求参数说明
参数 | 类型 | 说明 | 举例 | 必选 |
---|---|---|---|---|
offset | int | 分页查询的偏移量 | 0 | Yes |
limit | int | 分页页码 | 20 | Yes |
orderby | string | 分页排序字段 | id desc | Yes |
filter | string | 过滤条件,请参考ODATA表达式了解表达式规则 | type eq ‘USER’ | No |
keyword | string | 可模糊匹配权限组的名称和描述 | 员工管理 | No |
返回字段 | 类型 | 说明 | 举例 |
---|---|---|---|
id | long | 权限组id | 244 |
name | string | 权限组名称 | 员工管理 |
description | string | 权限组描述 | 员关HR使用 |
type | ENUM | 权限组类型 | 用户权限组或者组织角色权限组,USER/ORG_ROLE |
authorized | boolean | 是否对该权限组二级授权 | false |
grantedGroup.id | long | 授权组id | 1001 |
grantedGroup.orgRoleId | string | 组织角色ID 对于type为ORG_ROLE的权限组,才有此字段值 |
53, |
grantedGroup.grantedUsers[i] .id |
long | 用户授权ID对于type为ORG_ROLE的权限组,才有此字段值对于type为ORG_ROLE的权限组,才有此字段值 | 122, |
grantedGroup.grantedUsers[i] .grantedDateTime |
LocalDateTime | 用户授权时间 对于type为ORG_ROLE的权限组,才有此字段值 |
“2021-03-26T07:53:12.000Z” |
grantedGroup.grantedUsers[i] .userId |
string | 授权用户的UserId | “5d37f96b456213410aeaa247” |
targetGroup.id | long | 授权范围id | 1001 |
targetGroup.selfSetting | ENUM | 包含自己的范围设置 DEFAULT(“是否包括自己取决于范围控制”), INCLUDE_SELF(“强制包括自己”), EXCLUDE_SELF(“强制不包括自己”) |
DEFAULT |
targetGroup.scopeGroups[j] .id |
long | 范围组ID | 122 |
targetGroup.scopeGroups[j] .scopeList[k].id |
long | 范围列表ID | 134 |
targetGroup.scopeGroups[j] .scopeList[k].orgType |
ENUM | 组织类型, SUPERVISORY(“组织架构”), LOCATION(“区域”), COST_CENTER(“成本中心”), COMPANY(“公司”); |
SUPERVISORY |
targetGroup.scopeGroups[j] .scopeList[k].customizeOrgNoList |
array | SUPERVISORY(“组织架构”), LOCATION(“区域”), COST_CENTER(“成本中心”), COMPANY(“公司”) |
[“5d367e4b4562f908a117e575”, “5d367e4b4562f908a117e576”, “5d367e4b4562f908a117e578”] |
targetGroup.scopeGroups[j] .scopeList[k].scopeTypeList |
array | 下拉选择的范围列表,跟老版本兼容。 type=”USER”且orgType=”SUPERVISORY”的时生效。SCOPE_COMPANY SCOPE_DEPARTMENT, SCOPE_CUSTOMIZED, SCOPE_MANAGER_DEPARTMENT, SCOPE_HRBP_DEPARTMENT, SCOPE_DEPARTMENT_WITHOUT_SUB, SCOPE_MANAGER_DEPARTMENT_WITHOUT_SUB, SCOPE_HRBP_DEPARTMENT_WITHOUT_SUB |
[“SCOPE_DEPARTMENT”, “SCOPE_CUSTOMIZED”] |
targetGroup.scopeGroups[j] .scopeList[k].orgRoleScopeTypeList |
array | 下拉选择的范围列表,内容枚举值。 SCOPE_ORG_ALL, SCOPE_ORG, SCOPE_ORG_WITHOUT_SUB, SCOPE_ORG_CUSTOMIZED |
[“SCOPE_ORG_WITHOUT_SUB”, “SCOPE_ORG_CUSTOMIZED”] |
返回值示例
{
"id": 244,
"name": "员工管理",
"description": null,
"authorized": false,
"type": "USER",
"grantedGroup": {
"id": 53,
"orgRoleId": null,
"grantedUsers": [
{
"id": 93,
"grantedDateTime": "1899-12-31T16:00:00.000Z",
"userId": "5d37f964456213410aeaa1f3"
},
{
"id": 131,
"grantedDateTime": "2021-03-26T07:53:12.000Z",
"userId": "5d37f96b456213410aeaa247"
}
]
},
"targetGroup": {
"id": 53,
"selfSetting": "DEFAULT",
"scopeGroups": [
{
"id": 53,
"scopeList": [
{
"id": 53,
"orgType": "SUPERVISORY",
"scopeTypeList": [
"SCOPE_CUSTOMIZED"
],
"orgRoleScopeTypeList": [],
"customizeOrgNoList": [
"5d367e4b4562f908a117e575",
"5d367e4b4562f908a117e576"
]
}
]
}
]
}
}