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")
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")
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")
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")
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")