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

Bed 4582 #787

Merged
merged 8 commits into from
Aug 14, 2024
Merged

Bed 4582 #787

merged 8 commits into from
Aug 14, 2024

Conversation

stephanieslamb
Copy link
Contributor

Description

Updated DeleteSavedQueries endpoint to check if query is public and if user has admin privileges.

Motivation and Context

This PR addresses: BED-4582

Why is this change required? What problem does it solve?
This change is part of the on-going initiative to saved cypher queries. This change will prevent users who are not admin from deleting public saved queries.

How Has This Been Tested?

Additional unit tests were added for additional functionality and all previous unit tests are passing.

Screenshots (optional):

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

@stephanieslamb stephanieslamb added enhancement New feature or request api A pull request containing changes affecting the API code. labels Aug 12, 2024
@stephanieslamb stephanieslamb self-assigned this Aug 12, 2024
Copy link
Contributor

@superlinkx superlinkx left a comment

Choose a reason for hiding this comment

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

A couple of things to hopefully reduce nested logic a bit and move some code back towards the database. Otherwise, the tests look pretty comprehensive and code looks as expected.

cmd/api/src/api/v2/saved_queries.go Outdated Show resolved Hide resolved
cmd/api/src/api/v2/saved_queries.go Outdated Show resolved Hide resolved
@stephanieslamb stephanieslamb marked this pull request as draft August 13, 2024 17:37
@stephanieslamb stephanieslamb marked this pull request as ready for review August 14, 2024 15:04
@stephanieslamb stephanieslamb merged commit 40724e4 into main Aug 14, 2024
3 checks passed
@stephanieslamb stephanieslamb deleted the BED-4582 branch August 14, 2024 19:07
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api A pull request containing changes affecting the API code. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants