예제 #1
0
파일: views.py 프로젝트: papain/nbproject
def move_file(P, req):
    uid = UR.getUserId(req)
    f_auth = auth.canMoveFile if P[
        "item_type"] == "file" else auth.canMoveFolder
    if not f_auth(uid, P["id"], P["dest"]):
        return UR.prepare_response({}, 1, "NOT ALLOWED")
    return UR.prepare_response(
        {P["item_type"] + "s": annotations.move_file(uid, P)})
예제 #2
0
파일: views.py 프로젝트: pwilkins/nbproject
def move_file(P,req): 
    uid = UR.getUserId(req)
    f_auth = auth.canMoveFile if P["item_type"]=="file" else auth.canMoveFolder
    if not f_auth(uid, P["id"], P["dest"]):
        return UR.prepare_response({}, 1,  "NOT ALLOWED")
    return UR.prepare_response({P["item_type"]+"s": annotations.move_file(uid, P)})
예제 #3
0
def move_file(P,req): 
    uid = UR.getUserId(req)
    if not auth.canMoveFile(uid, P["id"]):
        return UR.prepare_response({}, 1,  "NOT ALLOWED")
    return UR.prepare_response({"files": annotations.move_file(uid, P)})
예제 #4
0
def move_file(P, req):
    uid = UR.getUserId(req)
    if not auth.canMoveFile(uid, P["id"]):
        return UR.prepare_response({}, 1, "NOT ALLOWED")
    return UR.prepare_response({"files": annotations.move_file(uid, P)})