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-1353 Support Favorite Resources in Sam #1509

Merged
merged 6 commits into from
Aug 13, 2024

Conversation

tlangs
Copy link
Contributor

@tlangs tlangs commented Aug 9, 2024

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

<Don't forget to include the ticket number in the PR title!>

What:

We're migrating favorite resources out of Thurloe! This PR adds support for favorite resources in Sam

Why:

Thurloe's user profile functionality is being deprecated and migrated to other services. Since Sam stores both Users and Resources, it makes sense for Sam to store a User's favorite resources.

How:

Just your standard API to DB implementation.

Note: If a user must have access to a resource to be able to favorite it. This is so that a user cannot probe Sam to find out what resources might exist by seeing what can and can't be favorited. The same constraint does not apply to removing a favorite resource, since a user who loses access to a resource probably wants to remove it from their favorites.


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

}

// when(samRoutes.requireAnyAction(ArgumentMatchers.eq(resource), ArgumentMatchers.eq(user.id), any[SamRequestContext]))
// .thenReturn(Directives.mapInnerRoute { innerRoute => onSuccess(IO.unit) { innerRoute } })
Copy link
Contributor

Choose a reason for hiding this comment

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

did you mean to leave this here?

@tlangs tlangs enabled auto-merge (squash) August 13, 2024 19:51
@tlangs tlangs disabled auto-merge August 13, 2024 20:21
tlangs added 2 commits August 13, 2024 16:22
…roadinstitute/sam into tl_ID-1353_sam_user_favorite_resources
@tlangs tlangs enabled auto-merge (squash) August 13, 2024 20:23
Copy link

@tlangs tlangs merged commit e2cea3f into develop Aug 13, 2024
18 checks passed
@tlangs tlangs deleted the tl_ID-1353_sam_user_favorite_resources branch August 13, 2024 20:37
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