From db651dda007ce6a6721835b60e81e86aabb56004 Mon Sep 17 00:00:00 2001 From: Suzanne Vogt Date: Wed, 24 Jun 2026 10:46:53 -0400 Subject: [PATCH 1/6] Add consortium admin to abilities calculation for 'create' --- app/abilities/provider.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/abilities/provider.js b/app/abilities/provider.js index 55e1e3a47..8388de642 100644 --- a/app/abilities/provider.js +++ b/app/abilities/provider.js @@ -13,6 +13,11 @@ export default class Provider extends Ability { switch (this.get('currentUser.role_id')) { case 'staff_admin': return true; + case 'consortium_admin': + return ( + this.get('currentUser.provider_id') === + this.get('model.consortium.id') + ); default: return false; } From cf3638958be16ebfbde9fa0438daf4734b53c65b Mon Sep 17 00:00:00 2001 From: Suzanne Vogt Date: Wed, 24 Jun 2026 16:45:45 -0400 Subject: [PATCH 2/6] Add tax status to edit form for consortium_admin. Remove abilities create/delete for consortium_admin. --- app/abilities/provider.js | 10 ---------- app/templates/providers/show/edit.hbs | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/app/abilities/provider.js b/app/abilities/provider.js index 8388de642..e2e1e716e 100644 --- a/app/abilities/provider.js +++ b/app/abilities/provider.js @@ -13,11 +13,6 @@ export default class Provider extends Ability { switch (this.get('currentUser.role_id')) { case 'staff_admin': return true; - case 'consortium_admin': - return ( - this.get('currentUser.provider_id') === - this.get('model.consortium.id') - ); default: return false; } @@ -28,11 +23,6 @@ export default class Provider extends Ability { switch (this.get('currentUser.role_id')) { case 'staff_admin': return true; - case 'consortium_admin': - return ( - this.get('currentUser.provider_id') === - this.get('model.consortium.id') - ); default: return false; } diff --git a/app/templates/providers/show/edit.hbs b/app/templates/providers/show/edit.hbs index df3143ada..d193430da 100644 --- a/app/templates/providers/show/edit.hbs +++ b/app/templates/providers/show/edit.hbs @@ -138,6 +138,27 @@ {{/if}} {{/if}} + {{#if (eq this.model.memberType 'consortium')}} + + + {{titleize item}} + + + {{/if}} Date: Thu, 25 Jun 2026 14:02:43 -0400 Subject: [PATCH 3/6] tax status field. --- app/abilities/provider.js | 2 ++ app/routes/providers/show/edit.js | 1 + app/templates/providers/show/edit.hbs | 37 ++++++++++++--------------- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/app/abilities/provider.js b/app/abilities/provider.js index e2e1e716e..7d1997a2e 100644 --- a/app/abilities/provider.js +++ b/app/abilities/provider.js @@ -13,6 +13,8 @@ export default class Provider extends Ability { switch (this.get('currentUser.role_id')) { case 'staff_admin': return true; + case 'consortium_admin': + return true; default: return false; } diff --git a/app/routes/providers/show/edit.js b/app/routes/providers/show/edit.js index 79c30e055..8a97c9bd4 100644 --- a/app/routes/providers/show/edit.js +++ b/app/routes/providers/show/edit.js @@ -22,6 +22,7 @@ export default class EditRoute extends Route { return contact.deleted === null; }) provider.set('filteredContacts', filteredContacts) + provider.set("consortium_id", this.modelFor('providers/show').get('consortium.id')); return provider; } diff --git a/app/templates/providers/show/edit.hbs b/app/templates/providers/show/edit.hbs index d193430da..fd5380eed 100644 --- a/app/templates/providers/show/edit.hbs +++ b/app/templates/providers/show/edit.hbs @@ -96,6 +96,19 @@ {{titleize (humanize item)}} + {{/if}} + {{#if (or + (can 'create provider') + (and + (or (eq this.model.memberType 'consortium') + (and + (eq this.model.memberType 'consortium_organization') + (eq this.model.consortium_id this.model.consortium.id) + ) + ) + ) + ) + }} + {{/if}} + {{#if (can 'create provider')}} {{#if (eq this.model.memberType 'consortium_organization')}} {{/if}} {{/if}} - {{#if (eq this.model.memberType 'consortium')}} - - - {{titleize item}} - - - {{/if}} + Date: Wed, 8 Jul 2026 15:58:36 -0400 Subject: [PATCH 4/6] Hide salesforce field from consortium admin on create/update organization. Move tax status field to below country field on create/update organization --- app/abilities/provider.js | 10 +++ app/templates/providers/show/edit.hbs | 66 +++++++++---------- .../providers/show/organizations/new.hbs | 44 ++++++------- 3 files changed, 65 insertions(+), 55 deletions(-) diff --git a/app/abilities/provider.js b/app/abilities/provider.js index 7d1997a2e..6f34ca5f9 100644 --- a/app/abilities/provider.js +++ b/app/abilities/provider.js @@ -20,6 +20,16 @@ export default class Provider extends Ability { } } + @computed('currentUser.role_id', 'model.{id,provider_id}') + get canEditSalesforceField() { + switch (this.get('currentUser.role_id')) { + case 'staff_admin': + return true; + default: + return false; + } + } + @computed('currentUser.{role_id,provider_id}', 'model.consortium.id') get canDelete() { switch (this.get('currentUser.role_id')) { diff --git a/app/templates/providers/show/edit.hbs b/app/templates/providers/show/edit.hbs index fd5380eed..45aff7055 100644 --- a/app/templates/providers/show/edit.hbs +++ b/app/templates/providers/show/edit.hbs @@ -55,7 +55,7 @@ {{if item.name item.name this.model.rorId}} - {{#if (can 'create provider')}} + {{#if (can 'editSalesforceField provider')}} {{/if}} - {{#if (or - (can 'create provider') - (and - (or (eq this.model.memberType 'consortium') - (and - (eq this.model.memberType 'consortium_organization') - (eq this.model.consortium_id this.model.consortium.id) - ) - ) - ) - ) - }} - - - {{titleize item}} - - - {{/if}} {{#if (can 'create provider')}} {{#if (eq this.model.memberType 'consortium_organization')}} + {{#if (or + (can 'create provider') + (and + (or (eq this.model.memberType 'consortium') + (and + (eq this.model.memberType 'consortium_organization') + (eq this.model.consortium_id this.model.consortium.id) + ) + ) + ) + ) + }} + + + {{titleize item}} + + + {{/if}} - {{#if (can 'create provider')}} + {{#if (can 'editSalesforceField provider')}} {{/if}} - {{#if (can 'create provider')}} - - - {{titleize item}} - - - {{/if}} + {{#if (can 'create provider')}} + + + {{titleize item}} + + + {{/if}} Date: Wed, 8 Jul 2026 16:53:33 -0400 Subject: [PATCH 5/6] Fix tax status to be below country for admin. --- app/templates/providers/new.hbs | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/app/templates/providers/new.hbs b/app/templates/providers/new.hbs index 506f11c4e..567b4b37f 100644 --- a/app/templates/providers/new.hbs +++ b/app/templates/providers/new.hbs @@ -109,25 +109,6 @@ {{titleize (humanize item)}} - - - {{titleize item}} - - {{#if (eq this.model.memberType 'consortium_organization')}} + + + {{titleize item}} + + Date: Thu, 9 Jul 2026 11:13:15 -0400 Subject: [PATCH 6/6] Fix consortium type and member fields to not show up in consortium forms. --- app/abilities/provider.js | 52 +++++++++++++++++++++------ app/templates/providers/show/edit.hbs | 7 ++-- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/app/abilities/provider.js b/app/abilities/provider.js index 6f34ca5f9..d986fda9c 100644 --- a/app/abilities/provider.js +++ b/app/abilities/provider.js @@ -20,16 +20,6 @@ export default class Provider extends Ability { } } - @computed('currentUser.role_id', 'model.{id,provider_id}') - get canEditSalesforceField() { - switch (this.get('currentUser.role_id')) { - case 'staff_admin': - return true; - default: - return false; - } - } - @computed('currentUser.{role_id,provider_id}', 'model.consortium.id') get canDelete() { switch (this.get('currentUser.role_id')) { @@ -90,4 +80,44 @@ export default class Provider extends Ability { return false; } } -} + + @computed('currentUser.role_id', 'model.{id,provider_id}') + get canEditSalesforceField() { + switch (this.get('currentUser.role_id')) { + case 'staff_admin': + return true; + default: + return false; + } + } + + @computed('currentUser.role_id', 'model.{id,provider_id}') + get canEditMemberTypeField() { + switch (this.get('currentUser.role_id')) { + case 'staff_admin': + return true; + default: + return false; + } + } + + @computed('currentUser.role_id', 'model.{id,provider_id}') + get canEditConsortiumField() { + switch (this.get('currentUser.role_id')) { + case 'staff_admin': + return true; + default: + return false; + } + } + + @computed('currentUser.role_id', 'model.{id,provider_id}') + get canEditActiveField() { + switch (this.get('currentUser.role_id')) { + case 'staff_admin': + return true; + default: + return false; + } + } +} \ No newline at end of file diff --git a/app/templates/providers/show/edit.hbs b/app/templates/providers/show/edit.hbs index 45aff7055..571139c8b 100644 --- a/app/templates/providers/show/edit.hbs +++ b/app/templates/providers/show/edit.hbs @@ -75,7 +75,7 @@ @helpText="The Globus UUID used for token authentication." /> {{/if}} - {{#if (can 'create provider')}} + {{#if (can 'editMemberTypeField provider')}} {{/if}} - {{#if (can 'create provider')}} + {{#if (can 'editConsortiumField provider')}} {{#if (eq this.model.memberType 'consortium_organization')}} {{/if}} {{/if}} - {{/if}} {{/if}} - {{#if (can 'create provider')}} + {{#if (can 'editActiveField provider')}}