(domainId: string, tid: ObjectId)
| 239 | |
| 240 | @param('tid', Types.ObjectId) |
| 241 | async prepare(domainId: string, tid: ObjectId) { |
| 242 | this.tdoc = await training.get(domainId, tid); |
| 243 | if (!this.user.own(this.tdoc)) this.checkPerm(PERM.PERM_EDIT_TRAINING); |
| 244 | else this.checkPerm(PERM.PERM_EDIT_TRAINING_SELF); |
| 245 | } |
| 246 | |
| 247 | @param('tid', Types.ObjectId) |
| 248 | async get(domainId: string, tid: ObjectId) { |