Beispiel #1
0
def getGuestFileInfo(payload, req):
    if "id_source" not in payload: 
        return UR.prepare_response({}, 1, "missing id_source  !")
    id_source = payload["id_source"]
    output =  annotations.get_guestfileinfo(id_source)
    for i in output["ensembles"]: 
        if  not (output["ensembles"][i]["allow_guest"] or  auth.isMember(UR.getUserId(req), i)): 
            return  UR.prepare_response({}, 1, "not allowed: guest access isn't allowed for this file.")
    return UR.prepare_response(output)
Beispiel #2
0
def getGuestFileInfo(payload, req):
    if "id_source" not in payload: 
        return UR.prepare_response({}, 1, "missing id_source  !")
    id_source = payload["id_source"]
    output =  annotations.get_guestfileinfo(id_source)
    for i in output["ensembles"]: 
        if  not (output["ensembles"][i]["allow_guest"] or  auth.isMember(UR.getUserId(req), i)): 
            return  UR.prepare_response({}, 1, "not allowed: guest access isn't allowed for this file.")
    return UR.prepare_response(output)