diff --git a/app/analysis/edit/controller.js b/app/analysis/edit/controller.js index 5de568495..290e7cfd6 100644 --- a/app/analysis/edit/controller.js +++ b/app/analysis/edit/controller.js @@ -133,14 +133,15 @@ export default class AnalysisEditController extends Controller { return this.intersectionModel.user.get("id") === this.session.data.user.id; } + get isReviewer() { + return allQueryParams(this).reviewer === this.session.data.user.id; + } + get canVerify() { if (this.intersection.lastSuccessful.value.model.rejected !== false) { return false; } - return ( - allQueryParams(this).reviewer === this.session.data.user.id || - this.isSuperuser - ); + return this.isReviewer || this.isSuperuser; } get canBill() { diff --git a/app/analysis/edit/template.hbs b/app/analysis/edit/template.hbs index 5376c328f..f6004662e 100644 --- a/app/analysis/edit/template.hbs +++ b/app/analysis/edit/template.hbs @@ -160,7 +160,7 @@ @checked={{fi.value}} @onChange={{fi.update}} @disabled={{or - (not this.canVerify) + (and (not this.isReviewer) (not this.isSuperuser)) this.hasSelectedOwnReports }} >