(domainId: string, tid: ObjectId)
| 256 | |
| 257 | @param('tid', Types.ObjectId) |
| 258 | async prepare(domainId: string, tid: ObjectId) { |
| 259 | this.tdoc = await contest.get(domainId, tid); |
| 260 | if (!this.user.own(this.tdoc)) this.checkPerm(PERM.PERM_EDIT_HOMEWORK); |
| 261 | else this.checkPerm(PERM.PERM_EDIT_HOMEWORK_SELF); |
| 262 | } |
| 263 | |
| 264 | @param('tid', Types.ObjectId) |
| 265 | async get(domainId: string, tid: ObjectId) { |