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

TechDebt: Add Support For Authorization By Survey ID #1186

Merged
merged 2 commits into from
Jan 2, 2024
Merged

Conversation

NickPhura
Copy link
Collaborator

@NickPhura NickPhura commented Dec 19, 2023

Links to Jira Tickets

n/a

Description of Changes

  • Add support for authorization by for survey id.
  • Update all paths under ../{surveyId} to use survey id based authorization.
  • Updated a few GET endpoints to include collaborator/observer project permissions (was testing as a collaborator and was getting endpoint failures when trying to load a survey page).

Testing Notes

  • The only 'real' changes/enhancements are in the service/repo files.
  • All of the ../paths/.. changes are just to update to auth check to use survey id instead of project id.

Everything should work as before.

Update all paths under {surveyId} to use survey id based authorization.
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (e8fd46a) 58.16% compared to head (fb23bfd) 58.19%.

Files Patch % Lines
api/src/services/project-participation-service.ts 0.00% 2 Missing ⚠️
...c/repositories/project-participation-repository.ts 83.33% 0 Missing and 1 partial ⚠️
api/src/services/authorization-service.ts 95.23% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1186      +/-   ##
==========================================
+ Coverage   58.16%   58.19%   +0.03%     
==========================================
  Files         590      590              
  Lines       17964    17985      +21     
  Branches     2767     2773       +6     
==========================================
+ Hits        10448    10466      +18     
- Misses       6831     6833       +2     
- Partials      685      686       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KjartanE KjartanE self-assigned this Dec 19, 2023
Copy link
Contributor

@KjartanE KjartanE left a comment

Choose a reason for hiding this comment

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

🐈 Ran locally, functioned properly

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

8.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

Looks good to me 🛺

@NickPhura NickPhura merged commit bf6fbb1 into dev Jan 2, 2024
18 of 19 checks passed
@NickPhura NickPhura deleted the npTechDebt branch January 2, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants