查询员工权限
说明
该接口用于指定员工的权限,包括功能权限和基础数据权限。
接口限制
1. 10次/秒;
接口地址
/api/openapi/auth/user/permissions/query
请求类型
POST
请求参数
参数说明
参数名称 |
类型 |
是否必填 |
参数说明 |
employeeId |
String |
是 |
员工工号 |
getFunctionPermissions |
boolean |
否 |
是否返回功能权限,默认不返回 |
requiredBasicDataPermissionCodes |
List<String> |
否 |
需要查询的基础权限code,若不传则不返回任何权限 |
基础功能枚举
枚举值 |
名称 |
MANAGE_USER_GROUP |
用户组 |
MANAGE_LEGAL_ENTITY |
公司抬头 |
ORGANIZATION_MANAGE |
组织架构&员工管理 |
MANAGE_COST_CTRL |
多维费控 |
MANAGE_TRADING_PARTNER |
往来单位 |
INTEGRAL_EXPENSE |
费用兑换积分 |
MANAGE_RECEIPTS |
单据与流程 |
MAINTAIN_OPTION_GROUP |
自定义档案 |
MANAGE_BUDGET_PLAN |
预算方案 |
MANAGE_PAYMENT_ACCOUNT |
支付账户 |
BUDGET_ORGANIZATION |
层级预算组织树 |
参数样例
{
"employeeId": "EMP001",
"getFunctionPermissions": true,
"requiredBasicDataPermissionCodes": ["MANAGE_BUDGET_PLAN", "MANAGE_PAYMENT_ACCOUNT"]
}
返回参数
参数说明
参数名 |
类型 |
描述 |
userRoles |
List<UserRole> |
用户被授权的角色 |
dataPermissionGroups |
List<DataPermissionGroup> |
用户被授权的数据权限组配置 |
belongToCompanies |
List<DepartmentInfo> |
当前用户所属的组织 |
UserRole
参数名 |
类型 |
描述 |
roleBizCode |
String |
角色编码 |
roleName |
String |
角色名称 |
permissions |
List<Permission> |
角色开通的功能 |
roleAssignments |
List<UserRoleAssignment> |
角色开通的功能 |
Permission
参数名 |
类型 |
描述 |
code |
String |
功能编码 |
name |
String |
功能名称 |
UserRoleAssignment
参数名 |
类型 |
描述 |
assignedAsUser |
String |
是否以个人被授权 |
assignedInUserGroups |
List<UserGroupInfo> |
当前用户在的并且被授权的用户组 |
assignedInDepartments |
List<DepartmentInfo> |
当前用户在的并且被授权的部门(可能用户在其子部门) |
dataPermissionGroupBizCode |
String |
角色开通的功能 |
UserGroupInfo
参数名 |
类型 |
描述 |
bizCode |
String |
用户组编码 |
name |
String |
用户组名称 |
nameEn |
String |
用户组英文名称 |
DepartmentInfo
参数名 |
类型 |
描述 |
bizCode |
String |
部门编码 |
name |
String |
部门名称 |
nameEn |
String |
部门英文名称 |
includeChildren |
boolean |
是否含下级部门 |
DataPermissionGroup
参数名 |
类型 |
描述 |
groupBizCode |
String |
数据权限组编码 |
groupName |
String |
数据权限组名称 |
basicDataPermOptions |
List<BasicDataPermission> |
基础数据权限配置 |
BasicDataPermission
参数名 |
类型 |
描述 |
permCode |
String |
数据权限编码 |
permName |
String |
数据权限名称 |
departmentScopeMode |
BasicDataPermissionScopeMode |
数据权分配模式 |
departmentScopes |
List<DepartmentInfo> |
数据权限分配的组织 |
BasicDataPermissionScopeMode 枚举值
枚举值 |
名称 |
ALL |
所有组织 |
COMPANY_SELF |
自己所在组织。该模式下,用户所属的组织belongToCompanies会返回 |
WHITE_LIST |
指定组织 |
参数示例
{
"code": "ACK",
"message": "成功",
"data": {
"userRoles": [
{
"roleBizCode": "3232",
"roleName": "test new",
"permissions": [
{
"code": "AUTHORIZATION_ENTRUST",
"name": "授权委托"
},
{
"code": "AUTHORIZATION_MANAGE",
"name": "授权管理"
},
{
"code": "EMPLOYEE_MANAGE",
"name": "员工管理"
},
{
"code": "EXCHANGE_RATE",
"name": "汇率"
},
{
"code": "MANAGE_CASCADE_RELATION",
"name": "级联关系表管理"
},
{
"code": "MANAGE_LEGAL_ENTITY",
"name": "公司抬头"
},
{
"code": "MANAGE_PAYMENT_ACCOUNT",
"name": "支付账户"
},
{
"code": "MANAGE_TRADING_PARTNER",
"name": "往来单位管理"
},
{
"code": "MANAGE_USER_GROUP",
"name": "用户组"
},
{
"code": "ORGANIZATION_MANAGE",
"name": "组织架构"
},
{
"code": "ROLE_AND_PERM",
"name": "角色与权限"
}
],
"roleAssignments": [
{
"assignedAsUser": true,
"assignedInUserGroups": [
{
"bizCode": "UG2202041WFQ36AT",
"name": "1小波",
"nameEn": ""
}
],
"assignedInDepartments": [],
"dataPermissionGroupCode": "DP8312498665029780",
"dataPermissionGroupBizCode": null
}
]
}
],
"dataPermissionGroups": [
{
"groupBizCode": "y23232",
"groupName": "add test",
"basicDataPermOptions": [
{
"permCode": "MANAGE_BUDGET_PLAN",
"permName": "预算方案",
"departmentScopeMode": "WHITE_LIST",
"departmentScopes": [
{
"bizCode": "DI2109291LH7XIUE",
"name": "四级部门d2",
"nameEn": "",
"includeChildren": false
},
{
"bizCode": "DI2109291LH7XIVM",
"name": "yusuanbumen-feiyangyang",
"nameEn": "yusuanbumen-feiyangyang",
"includeChildren": false
}
]
},
{
"permCode": "MANAGE_PAYMENT_ACCOUNT",
"permName": "支付账户",
"departmentScopeMode": "COMPANY_SELF",
"departmentScopes": []
}
]
},
{
"groupBizCode": "DP221106231NTM2R",
"groupName": "gy台账11",
"basicDataPermOptions": [
{
"permCode": "MANAGE_BUDGET_PLAN",
"permName": "预算方案",
"departmentScopeMode": "ALL",
"departmentScopes": []
},
{
"permCode": "MANAGE_PAYMENT_ACCOUNT",
"permName": "支付账户",
"departmentScopeMode": "ALL",
"departmentScopes": []
}
]
},
{
"groupBizCode": "DP221106231NTM2P",
"groupName": "zjz数据权限组3",
"basicDataPermOptions": [
{
"permCode": "MANAGE_BUDGET_PLAN",
"permName": "预算方案",
"departmentScopeMode": "ALL",
"departmentScopes": []
},
{
"permCode": "MANAGE_PAYMENT_ACCOUNT",
"permName": "支付账户",
"departmentScopeMode": "ALL",
"departmentScopes": []
}
]
},
{
"groupBizCode": "DP2206271YIDDPP1",
"groupName": "1-表单",
"basicDataPermOptions": [
{
"permCode": "MANAGE_BUDGET_PLAN",
"permName": "预算方案",
"departmentScopeMode": "ALL",
"departmentScopes": []
},
{
"permCode": "MANAGE_PAYMENT_ACCOUNT",
"permName": "支付账户",
"departmentScopeMode": "ALL",
"departmentScopes": []
}
]
}
],
"belongToCompanies": [ {
"bizCode": "DI2109291LH7XIUE",
"name": "四级部门d2",
"nameEn": "",
"includeChildren": false
}]
},
"errorCode": null,
"success": true
}
修改记录
2023-10-18 初始化