简要描述:

  • 按角色返回表单权限列表

请求URL:

/apaas/api/v2/custom_app_grants

请求方式:

  • GET

请求参数:

传参名 是否必须 字段类型 描述
role_id true Int 角色ID

正确时返回:

{
    "code": 0,
    "message": "success",
    "remark": "成功",
    "data": [
        {
            "role": {
                "id": 12592,
                "name": "普通管理员",
                "settings": {
                    "default_role": true
                }
            },
            "custom_app": {
                "id": 2,
                "name": "市场应用",
                "status": "enable"
            },
            "form_grants": [
                {
                    "custom_app_grant_id": 6,
                    "organization_id": 5501989,
                    "custom_form": {
                        "id": 2,
                        "name": "市场应用"
                    },
                    "action_permission": [
                        {
                            "label": "新增市场应用",
                            "action": "create",
                            "checked": true
                        },
                        {
                            "label": "编辑市场应用",
                            "action": "edit",
                            "checked": true
                        },
                        {
                            "label": "查看市场应用",
                            "action": "show",
                            "checked": true
                        },
                        {
                            "label": "删除市场应用",
                            "action": "destroy",
                            "checked": true
                        },
                        {
                            "label": "导入市场应用",
                            "action": "import",
                            "checked": true
                        },
                        {
                            "label": "导出市场应用",
                            "action": "export",
                            "checked": true
                        },
                        {
                            "label": "转移市场应用",
                            "action": "transfer",
                            "checked": true
                        }
                    ],
                    "data_permission": [
                        {
                            "label": "个人",
                            "value": 0,
                            "checked": true
                        },
                        {
                            "label": "所属部门",
                            "value": 1,
                            "checked": false
                        },
                        {
                            "label": "所属部门及下属部门",
                            "value": 2,
                            "checked": false
                        },
                        {
                            "label": "全公司",
                            "value": 3,
                            "checked": false
                        }
                    ],
                    "updated_at": "2023-08-09 10:25"
                }
            ]
        }
    ]
}

返回数据字段说明

字段名 参数类型 描述
custom_app Hash 应用信息
custom_app_grant_id 整型 权限记录数据库ID
organization_id 整型 企业ID
custom_form Hash 表单信息
action_permission 数组 操作权限信息
data_permission 数组 数据权限信息
xx[“label “] 字符串 显示名称
xx[“action “] 字符串 动作
xx[“checked “] 字符串 是否选中
文档更新时间: 2024-06-18 14:22   作者:蒋海军