Exemple #1
0
def get_class_settings(payload, req):
    uid = UR.getUserId(req)
    if "id_ensemble" in payload:
        if auth.canGetMembers(uid, payload["id_ensemble"]):
            class_settings = annotations.get_class_settings(uid, payload)
            return UR.prepare_response(class_settings)
    return UR.prepare_response({}, 1, "NOT ALLOWED")
Exemple #2
0
def get_class_settings(payload, req):
    uid = UR.getUserId(req)
    if "id_ensemble" in payload:
        if auth.canGetMembers(uid, payload["id_ensemble"]):
            class_settings = annotations.get_class_settings(uid, payload)
            return UR.prepare_response(class_settings)
    return UR.prepare_response({}, 1,  "NOT ALLOWED")
Exemple #3
0
def get_section_participants(payload, req):
    uid = UR.getUserId(req)
    if "id_ensemble" in payload:
        if auth.canGetMembers(uid, payload["id_ensemble"]):
            section_participants = annotations.get_section_participants(uid, payload)
            return UR.prepare_response(section_participants)
    return UR.prepare_response({}, 1,  "NOT ALLOWED")
Exemple #4
0
def getMembers(payload, req):
    uid = UR.getUserId(req)
    if "id_ensemble" in payload:
        if auth.canGetMembers(uid, payload["id_ensemble"]):
            return UR.prepare_response(
                annotations.get_members(payload["id_ensemble"]))
    return UR.prepare_response({}, 1, "NOT ALLOWED")
Exemple #5
0
def get_section_participants(payload, req):
    uid = UR.getUserId(req)
    if "id_ensemble" in payload:
        if auth.canGetMembers(uid, payload["id_ensemble"]):
            section_participants = annotations.get_section_participants(
                uid, payload)
            return UR.prepare_response(section_participants)
    return UR.prepare_response({}, 1, "NOT ALLOWED")
Exemple #6
0
def getMembers(payload, req): 
    uid = UR.getUserId(req)
    if "id_ensemble" in payload: 
        if auth.canGetMembers(uid, payload["id_ensemble"]): 
            return UR.prepare_response(annotations.get_members(payload["id_ensemble"]))
    return UR.prepare_response({}, 1,  "NOT ALLOWED")