Пример #1
0
    def delete(self, tid, eid):
        team = ReportTeam.get(tid)
        if session[USER_SESSION]["uid"] != team["create_uid"]:
            raise ExceptionEx("当前用户无法删除编辑人")

        ReportEditor.delete(eid)
        return self.succ()
Пример #2
0
    def delete(self, tid, eid):
        team = ReportTeam.get(tid)
        if session[USER_SESSION]["uid"] != team["create_uid"]:
            raise ExceptionEx("当前用户无法删除编辑人")


        ReportEditor.delete(eid)
        return self.succ()
Пример #3
0
    def post(self, tid):
        submit = self.request()
        team = ReportTeam.get(tid)
        if session[USER_SESSION]["uid"] != team["create_uid"]:
            raise ExceptionEx("当前用户无法新建编辑人")

        submit["team_id"] = tid

        ReportEditor.add(submit)
        return self.succ()
Пример #4
0
    def post(self, tid):
        submit = self.request()
        team = ReportTeam.get(tid)
        if session[USER_SESSION]["uid"] != team["create_uid"]:
            raise ExceptionEx("当前用户无法新建编辑人")

        submit["team_id"] = tid

        ReportEditor.add(submit)
        return self.succ()
Пример #5
0
 def put(self, rid):
     submit = self.request()
     submit["id"] = rid
     ReportTeam.edit(submit)
     return self.succ()
Пример #6
0
 def delete(self, rid):
     ReportTeam.delete(rid)
     return self.succ()
Пример #7
0
 def post(self):
     submit = self.request()
     submit["create_uid"] = session[USER_SESSION]["uid"]
     ReportTeam.add(submit)
     return self.succ()
Пример #8
0
 def get(self):
     return self.succ(ReportTeam.select())