返回用户权限列表

HTTP Request

GET /api/v2/permissions

  • common_customer_columns 为客户公海设置
  • has_joined_ik_invoicing 是否和进销存打通
  • customer_approve 是否开启了客户审核
字段 类型 说明
permissions Array Permission对象数组,Permission见详细说明,全部权限列表参考此文档
visible_tabs Array 在每个模块下用户可见的tab页。
organization_setting Object 企业配置。
user_setting Object 用户配置。
features Object 企业开启的功能和自定义业务。

Permission详细说明

字段 类型 说明
id ID 权限ID
name string 权限名称。
subject string 模块名字,模块对应的业务模型名字小写下划线格式的英文单词。
action string 针对模块的操作, 一般情况: create=创建, edit=编辑, show=查看, destroy=删除,crud=增删改查
created_at datetime 权限的创建时间

返回数据示例

{
    "code": 0,
    "data": {
        "permissions": [
            {
            "id": 1000068,
            "name": "create_schedule_report",
            "subject": "schedule_report",
            "action": "create",
            "created_at": "2019-03-22 17:05"
        }, {
            "id": 1000069,
            "name": "edit_schedule_report",
            "subject": "schedule_report",
            "action": "edit",
            "created_at": "2019-03-22 17:05"
        }, {
            "id": 1000070,
            "name": "show_schedule_report",
            "subject": "schedule_report",
            "action": "show",
            "created_at": "2019-03-22 17:05"
        }, {
            "id": 1000071,
            "name": "destroy_schedule_report",
            "subject": "schedule_report",
            "action": "destroy",
            "created_at": "2019-03-22 17:05"
        }, {
            "id": 68,
            "name": "工作报告编辑",
            "subject": "schedule_report",
            "action": "crud",
            "created_at": "2014-12-16 11:28"
        }, {
            "id": 123,
            "name": "查看公告",
            "subject": "announcement",
            "action": "show",
            "created_at": "2015-11-11 17:05"
        }, {
            "id": 76,
            "name": "组织架构管理",
            "subject": "user_center",
            "action": "edit",
            "created_at": "2014-12-16 11:28"
        }, {
            "id": 75,
            "name": "查看组织架构",
            "subject": "user_center",
            "action": "show",
            "created_at": "2014-12-16 11:28"
        }, {
            "id": 49,
            "name": "编辑公司信息",
            "subject": "organization",
            "action": "edit",
            "created_at": "2014-11-03 18:07"
        }, {
            "id": 65,
            "name": "查看公司信息",
            "subject": "organization",
            "action": "show",
            "created_at": "2014-12-16 11:28"
        }, {
            "id": 1,
            "name": "编辑客户资料",
            "subject": "customer",
            "action": "edit",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 2,
            "name": "查看客户资料",
            "subject": "customer",
            "action": "show",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 3,
            "name": "删除客户",
            "subject": "customer",
            "action": "destroy",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 4,
            "name": "创建客户",
            "subject": "customer",
            "action": "create",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 5,
            "name": "编辑联系人资料",
            "subject": "contact",
            "action": "edit",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 6,
            "name": "查看联系人资料",
            "subject": "contact",
            "action": "show",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 7,
            "name": "删除联系人",
            "subject": "contact",
            "action": "destroy",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 8,
            "name": "创建联系人",
            "subject": "contact",
            "action": "create",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 9,
            "name": "编辑商机资料",
            "subject": "opportunity",
            "action": "edit",
            "created_at": "2014-07-23 17:19"
        }, {
            "id": 10,
            "name": "查看商机资料",
            "subject": "opportunity",
            "action": "show",
            "created_at": "2014-07-23 17:19"
        }],
        "visible_tabs": [
            {
            "subject": "lead",
            "label": "全部线索",
            "value": "",
            "id": 1
        }, {
            "subject": "lead",
            "label": "我的线索",
            "value": "my",
            "id": 2
        }, {
            "subject": "customer",
            "label": "全部客户",
            "value": "",
            "id": 3
        }, {
            "subject": "customer",
            "label": "我的客户",
            "value": "my",
            "id": 4
        }, {
            "subject": "customer",
            "label": "我协作的客户",
            "value": "assist",
            "id": 5
        }, {
            "subject": "contact",
            "label": "全部联系人",
            "value": "",
            "id": 6
        }, {
            "subject": "contact",
            "label": "我的联系人",
            "value": "my",
            "id": 7
        }, {
            "subject": "contact",
            "label": "我协作的联系人",
            "value": "my_assist",
            "id": 8
        }, {
            "subject": "opportunity",
            "label": "全部商机",
            "value": "",
            "id": 9
        }, {
            "subject": "opportunity",
            "label": "我的商机",
            "value": "my",
            "id": 10
        }, {
            "subject": "opportunity",
            "label": "我协作的商机",
            "value": "assist",
            "id": 11
        }, {
            "subject": "contract",
            "label": "全部合同",
            "value": "",
            "id": 12
        }, {
            "subject": "contract",
            "label": "我的合同",
            "value": "my",
            "id": 13
        }, {
            "subject": "contract",
            "label": "我协作的合同",
            "value": "assist",
            "id": 14
        }, {
            "subject": "contract",
            "label": "7天内需要回款的合同",
            "value": "contract_receive_date",
            "id": 15
        }, {
            "subject": "contract",
            "label": "30天内将到期的合同",
            "value": "contract_end_at",
            "id": 16
        }, {
            "subject": "contract",
            "label": "我的草稿",
            "value": "draft",
            "id": 17
        }, {
            "subject": "schedule_report",
            "label": "我提交的报告",
            "value": "my",
            "id": 18
        }, {
            "subject": "schedule_report",
            "label": "提交给我的报告",
            "value": "to_me",
            "id": 19
        }, {
            "subject": "schedule_report",
            "label": "我下属的报告",
            "value": "sub",
            "id": 20
        }, {
            "subject": "sales_circle",
            "label": "全部",
            "name": "tab_types",
            "value": "",
            "id": 21
        }, {
            "subject": "sales_circle",
            "label": "工作报告",
            "name": "tab_types",
            "value": "ScheduleReport",
            "id": 22
        }, {
            "subject": "sales_circle",
            "label": "跟进记录",
            "name": "tab_types",
            "value": "RevisitLog",
            "id": 23
        }, {
            "subject": "sales_circle",
            "label": "拜访签到",
            "name": "tab_types",
            "value": "Checkin",
            "id": 24
        }, {
            "subject": "sales_circle",
            "label": "发帖",
            "name": "tab_types",
            "value": "Posts",
            "id": 25
        }, {
            "subject": "sales_circle",
            "label": "数据上报",
            "name": "tab_types",
            "value": "DataReport",
            "id": 26
        }, {
            "subject": "checkin",
            "label": "全部签到",
            "value": "",
            "id": 27
        }, {
            "subject": "checkin",
            "label": "我的签到",
            "value": "my",
            "id": 28
        }, {
            "subject": "expense_account",
            "label": "全部报销单",
            "value": "",
            "id": 29
        }, {
            "subject": "expense_account",
            "label": "我的报销单",
            "value": "my_own",
            "id": 30
        }, {
            "subject": "expense",
            "label": "全部费用",
            "value": "",
            "id": 31
        }, {
            "subject": "expense",
            "label": "我的费用",
            "value": "my_own",
            "id": 32
        }, {
            "subject": "call_out_stats",
            "label": "有效呼出次数",
            "value": "effective_count",
            "id": 33
        }, {
            "subject": "call_out_stats",
            "label": "有效呼出时长",
            "value": "effective_time",
            "id": 34
        }, {
            "subject": "call_out_stats",
            "label": "呼出次数",
            "value": "all_count",
            "id": 35
        }, {
            "subject": "call_out_stats",
            "label": "呼出时长",
            "value": "all_time",
            "id": 36
        }, {
            "subject": "received_payment_center",
            "label": "回款计划",
            "value": "received_payment_plans",
            "id": 37
        }, {
            "subject": "received_payment_center",
            "label": "回款记录",
            "value": "received_payments",
            "id": 38
        }, {
            "subject": "received_payment_center",
            "label": "开票记录",
            "value": "invoiced_payments",
            "id": 39
        }],
        "organization_setting": {
            "contract_approve": false,
            "customer_approve": false,
            "opportunity_approve": false,
            "expense_account_approve": false,
            "receive_payment_approve": false,
            "has_approve_contract_permission": false,
            "has_approve_expense_account_permission": false,
            "has_receive_payment_permission": false,
            "has_open_video": "1",
            "has_open_shock": "1",
            "has_open_business_query": false,
            "decimal_digits": {
                "quantity_type_digit": "2",
                "money_type_digit": "2"
            },
            "address_region_country_enabled": true,
            "has_joined_ik_invoicing": false,
            "has_call_center": true,
            "has_call_agent": true,
            "has_batch_dialing": true,
            "has_soukebox": false,
            "daily": false,
            "weekly": false,
            "monthly": false,
            "approve_setting": {
                "contract": {
                    "policy": "can",
                    "fields": []
                },
                "customer": {
                    "policy": "cannot",
                    "fields": ["name"]
                },
                "opportunity": {
                    "policy": "cannot",
                    "fields": []
                }
            },
            "common_lead_columns": null
        },
        "user_setting": {
            "custom_filter": {
                "contact": {
                    "show": ["department_id", "user_id"],
                    "all": [
                        {
                        "label": "首字母筛选",
                        "field_name": "name_pinyin",
                        "filter_field_type": "link"
                    }, {
                        "label": "生日",
                        "field_name": "birth_date",
                        "filter_field_type": "birth_date"
                    }
                ]
                },
                "lead":,
                "customer": {},
                "opportunity": {},
                "contract": {},
                "expense": {},
                "expense_account": {},
                "received_payment_plan": {},
                "received_payment": {},
                "invoiced_payment": {}
            },
            "has_call_agent": true,
            "lead_common_filter": []
        },
        "features": {
            "common_customer": true,
            "common_lead": true,
            "contract": false,
            "knowledge_base": false,
            "wiki": false,
            "sms": true,
            "social_share": false,
            "expense_account": false,
            "business_query_subscription": false,
            "call_center": true
        }
    }
}
文档更新时间: 2025-04-29 14:18   作者:蒋海军