Get Parameters of Add User

2020-03-24 14:10:09
John Ten
1783
Final Edition:tengfei De 2020-03-24 14:10:21
Introduction:Request this method to return the relevant data regarding department, position, and privileges when adding a user.
Method Description

Request this method to return the relevant data regarding department, position, and privileges when adding a user.

Example
public function getUserCreateParams()
{
    include_once('../vendor/zentao/zentao.php');
    $zentao      = new \zentao();
    $extraFields = array('title', 'depts', 'groupList', 'roleGroup');    // customized fields returned
    $result      = $zentao->getUserCreateParams(array(), $extraFields);
    return $result;
}
Request
GET
Method

getUserCreateParams

Parameter
Name
Type
Required
Description
N/A


Result
success error
{
    "status": 1,
    "msg": "success",
    "result": {
        //Navbar of ZenTao
        "title": "Company-Add User",
        //Department【department key| the department that the user is from】
        "depts": {
            "0": "/",
            "1": "/Manager",
            "2": "/Dev",
            "3": "/QA",
            "4": "/Sales",
            "8": "/Customer",
            "11": "/Manager/PO",
            "12": "/Manager/PM"
        },
        //Privilege List【privilege key|privilege group that the use is in】
        "groupList": {
            "1": "Admin",
            "2": "Dev",
            "3": "QA",
            "4": "PM",
            "5": "PO",
            "6": "Dev Director",
            "7": "Product Director",
            "8": "QA Director",
            "9": "Senior Manager",
            "10": "Other",
            "11": "guest",
            "12": "limited user"
        },
        //position list【 position privilege group| the position that the user is at】
        "roleGroup": {
            "admin": "1",
            "dev": "2",
            "qa": "3",
            "pm": "4",
            "po": "5",
            "td": "6",
            "pd": "7",
            "qd": "8",
            "top": "9",
            "others": "10",
            "guest": "11",
            "limited": "12"
        }
    }
}
{
    "status": 0,
    "msg": "error",
    "result": []
}

Commenter
Commentaires reçus après vérification。