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

ID-807 Get tos for user v2 #1238

Merged
merged 34 commits into from
Nov 9, 2023
Merged

Conversation

Ghost-in-a-Jar
Copy link
Contributor

@Ghost-in-a-Jar Ghost-in-a-Jar commented Nov 1, 2023

Ticket: https://broadworkbench.atlassian.net/browse/ID-807

What:

Endpoints for getting a user's ToS status/details for themselves or for another user if they are an admin

PR checklist

  • I've followed the instructions if I've made any changes to the API, especially if they're breaking changes
  • I've filled out the Security Risk Assessment (requires Broad Internal network access) and attached the result to the JIRA ticket

Greg Polumbo and others added 26 commits October 23, 2023 15:32
…eDetails`. Introduce new `TermsOfServiceDetails`
… because of PostgresDirectoryDAOSpec, so adding the correct `assume` statements back into all the tests
…icated and unauthenticated routes both work
… for users are returned or denied properly
…ng AND requested user so that we can properly authorize requests
# Conflicts:
#	src/main/scala/org/broadinstitute/dsde/workbench/sam/api/TermsOfServiceRoutes.scala
#	src/main/scala/org/broadinstitute/dsde/workbench/sam/service/TosService.scala
#	src/test/scala/org/broadinstitute/dsde/workbench/sam/api/TermsOfServiceRouteSpec.scala
#	src/test/scala/org/broadinstitute/dsde/workbench/sam/service/TosServiceSpec.scala
@Ghost-in-a-Jar Ghost-in-a-Jar force-pushed the ID-807-Get-ToS-for-user-v2 branch from a1d1ba3 to 526cc4d Compare November 1, 2023 15:51
@Ghost-in-a-Jar Ghost-in-a-Jar force-pushed the ID-807-Get-ToS-for-user-v2 branch from 526cc4d to 6f77d68 Compare November 1, 2023 16:57
@Ghost-in-a-Jar Ghost-in-a-Jar marked this pull request as ready for review November 1, 2023 16:58
@Ghost-in-a-Jar Ghost-in-a-Jar changed the title Id 807 get to s for user v2 ID-807 Get tos for user v2 Nov 1, 2023
@Ghost-in-a-Jar Ghost-in-a-Jar force-pushed the ID-807-Get-ToS-for-user-v2 branch from f5dca60 to 70038ad Compare November 2, 2023 19:16
@Ghost-in-a-Jar Ghost-in-a-Jar force-pushed the ID-807-Get-ToS-for-user-v2 branch 2 times, most recently from 98c7d65 to 7c91f66 Compare November 6, 2023 19:34
@Ghost-in-a-Jar Ghost-in-a-Jar force-pushed the ID-807-Get-ToS-for-user-v2 branch from 7c91f66 to 35776ed Compare November 6, 2023 19:36
Copy link
Contributor

@sjkobori sjkobori left a comment

Choose a reason for hiding this comment

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

Left some comments, but otherwise lgtm!

@Ghost-in-a-Jar Ghost-in-a-Jar force-pushed the ID-807-Get-ToS-for-user-v2 branch from 15529cd to 75df08b Compare November 8, 2023 21:45
@Ghost-in-a-Jar Ghost-in-a-Jar force-pushed the ID-807-Get-ToS-for-user-v2 branch from 51686ed to 76bd86b Compare November 9, 2023 17:00
Copy link

sonarqubecloud bot commented Nov 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
1.5% 1.5% Duplication

Copy link
Contributor

@tlangs tlangs left a comment

Choose a reason for hiding this comment

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

Thanks for all the work on this! Just one question.

}
} ~
pathPrefix("history") { // api/termsOfService/v1/user/{userId}/history
validate(samUserIdPattern.matches(userId), "User ID must be alpha numeric") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Greg added it, idk that we NEED it but I think extra validation and user feedback is usually a good thing 🤷

@Ghost-in-a-Jar Ghost-in-a-Jar merged commit d992455 into develop Nov 9, 2023
17 of 22 checks passed
@Ghost-in-a-Jar Ghost-in-a-Jar deleted the ID-807-Get-ToS-for-user-v2 branch November 9, 2023 19: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