From 239f9e18d73875658e3eb757c5e096e96dcca60c Mon Sep 17 00:00:00 2001 From: John Tordoff <> Date: Mon, 13 Jan 2025 15:17:09 -0500 Subject: [PATCH] use FE feature flipping --- .../institutional-users-list/template.hbs | 17 +++++++++-------- .../object-list/contributors-field/template.hbs | 16 +++++++++------- app/models/institution.ts | 1 + 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/app/institutions/dashboard/-components/institutional-users-list/template.hbs b/app/institutions/dashboard/-components/institutional-users-list/template.hbs index 71b0f3a4525..a38dba87416 100644 --- a/app/institutions/dashboard/-components/institutional-users-list/template.hbs +++ b/app/institutions/dashboard/-components/institutional-users-list/template.hbs @@ -175,14 +175,15 @@ {{institutionalUser.userName}} - + {{#if @institution.institutionalRequestAccessEnabled}} + + {{/if}} {{else if (eq column.type 'osf_link')}} {{institutionalUser.userGuid}} diff --git a/app/institutions/dashboard/-components/object-list/contributors-field/template.hbs b/app/institutions/dashboard/-components/object-list/contributors-field/template.hbs index 2750217ec7a..db7e51600d8 100644 --- a/app/institutions/dashboard/-components/object-list/contributors-field/template.hbs +++ b/app/institutions/dashboard/-components/object-list/contributors-field/template.hbs @@ -7,13 +7,15 @@ {{t 'institutions.dashboard.object-list.table-items.permission-level' permissionLevel=contributor.permissionLevel}} - + {{#if @institution.institutionalRequestAccessEnabled}} + + {{/if}} {{else}}
{{t 'institutions.dashboard.object-list.table-items.no-contributors'}} diff --git a/app/models/institution.ts b/app/models/institution.ts index 9b0432faf02..7627611a049 100644 --- a/app/models/institution.ts +++ b/app/models/institution.ts @@ -35,6 +35,7 @@ export default class InstitutionModel extends OsfModel { // identifier_domain in the admin app @attr('fixstring') iri!: string; @attr('fixstringarray') iris!: string[]; + @attr('boolean', { defaultValue: false }) institutionalAccessRequestEnabled!: boolean; // TODO Might want to replace calls to `users` with `institutionUsers.user`? @hasMany('user', { inverse: 'institutions' })