phac-nml / irida-next

IRIDA Next
https://phac-nml.github.io/irida-next/
Apache License 2.0
8 stars 3 forks source link

FIX: Analyst workflow submission #540

Closed deepsidhu85 closed 5 months ago

deepsidhu85 commented 5 months ago

What does this PR do and why?

Describe in detail what your merge request does and why.

This PR fixes a bug in the project_policy -> submit_workflow? method, which was passing in the project record instead of the project's namespace as is expected by the can_submit_workflow? and effective_access_level within the member.rb file.

Added a project_policy and system test to verify an analyst can submit a workflow through a namespace group link as that's how the issue was discovered.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other pull requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Login as user2@email.com
  2. Create a group User2Group
  3. Logout and login as user1@email.com 4 Create project under user namespace Project1
  4. Create sample in project
  5. Go to the project Members page and click the Groups tab
  6. Invite group User2Group to the project with an Analyst access level
  7. Logout and login as user2@email.com
  8. Go into the Project1 (created in step 4) from the projects dashboard
  9. Go to the project samples page and verify you can now select the sample, see the pipeline launch button, and launch a workflow

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

github-actions[bot] commented 5 months ago

Simplecov Report

Covered Threshold
91.85% 90%