Example #1
0
def getUserInfo(HOSTNAME, APPNAME, username):
    url = HOSTNAME + "/user/getById"
    textmod = {"username": username, "app_name": APPNAME}
    return get(url, textmod)
Example #2
0
def assignPerm(HOSTNAME, APPNAME, permitName, rid):
    url = HOSTNAME + "/role/assignPerm"
    textmod = {u"app_name": APPNAME, u"pname": permitName, u"rid": rid}
    return get(url, textmod)
Example #3
0
def listPermById(HOSTNAME, APPNAME, uid):
    url = HOSTNAME + "/perms/listAllByUid"
    textmod = {"uid": uid, "app_name": APPNAME}
    return get(url, textmod)
Example #4
0
def listTree(HOSTNAME, rid, parse=None):
    url = HOSTNAME + "/orgTree/listTree"
    textmod = {"rid": rid}
    if parse:
        textmod["parse"] = 1
    return get(url, textmod)
Example #5
0
def getOrg(HOSTNAME, APPNAME, code):
    url = HOSTNAME + "/orgTree/getNodeInfo"
    textmod = {"app_name": APPNAME, "code": code}
    return get(url, textmod)
Example #6
0
def listPermit(HOSTNAME, APPNAME):
    url = HOSTNAME + "/perms/listAll"
    textmod = {"app_name": APPNAME, "qs": "", "pageNum": 0, "pageSize": 1000}
    print APPNAME
    return get(url, textmod)
Example #7
0
def deletePermit(HOSTNAME, permitId):
    url = HOSTNAME + "/perms/delete"
    textmod = {"ids": permitId}
    return get(url, textmod)