Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BI-2152 - Experimental Collaborator Front-end Permissions #396

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

davedrp
Copy link
Contributor

@davedrp davedrp commented Aug 28, 2024

Description

BI-2152 - Experimental Collaborator Front-end Permissions

Changes made

Hide all menu items except for home, experiments and observations, BrAPI

  1. Added subjects to AppAbility.ts to correspond to options in the side-bar menu.
  2. In ability.ts add role permission list for experimentalcollaborator, also mad the roll permission list explicit for readonly.

Restrict Manage Experiments menu

  1. added can('create', 'Collaborator'); to programadministrator and systemadministrator in ability.ts.
  2. Modified the ActionMenuItem in ExperimentDetails.vue to include this.$ability.can('create', 'Collaborator').

Dependencies

bi-api: develop branch

Testing

  1. Log in as an Experimental Collaborator with at least on experiment assigned.

Expected result
The Side-bar Menu should have only three options:

  • Home,
  • Experiments & Observatins
  • BrAPI
  1. Go to a valid experiment.
  2. Click on the Manage Experiment pull down.

Expected result

  • Only the Download file option should be available (the other options should be grayed-out.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <link to TAF run>

@davedrp davedrp requested review from a team, nickpalladino and mlm483 and removed request for a team August 28, 2024 16:36
@nickpalladino
Copy link
Member

I'll test this once BI-2256 and BI-2258 are merged

Copy link
Contributor

@mlm483 mlm483 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

<router-link
v-bind:to="{name: 'germplasm', params: {programId: activeProgram.id}}"
:id="germplasmMenuId"
v-if="$ability.can('access', 'Germplasm')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a v-if on this router-link but not the others? You might consider standardizing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Copy link
Member

@nickpalladino nickpalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side menu looks good, menu actions disabled looks good.

@davedrp davedrp merged commit f2d2424 into develop Aug 30, 2024
1 check passed
@davedrp davedrp deleted the feature/BI-2152 branch August 30, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants