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

Add owner checks to report_count queries #1397

Merged
merged 3 commits into from
Jan 26, 2021

Conversation

mattmundell
Copy link
Contributor

@mattmundell mattmundell commented Jan 25, 2021

What:

Only use the current user's cached report_counts when getting a report's severity.

Needed because overrides may change the severity across users. Without
overrides the max severity of a report is the same for all users.

Why:

GET_TASKS was returning wrong info.

How did you test it:

  1. create 2 users
  2. share a report that has no high results between the users
  3. override one result to high as user1
  4. look at the report with both users with overrides applied, to get the counts cached
  5. as user2 run '<get_tasks filter="apply_overrides=1 severity=10 min_qod=70"/>' This will return the shared task, even though the severity is not overridden to 10 for this user.
  6. as user2 run '<get_tasks filter="apply_overrides=1 high>0 min_qod=70"/>' Similarly this will return the shared task.

Same result with Dynamic Severity on and off.

Checklist:

Needed because overrides may change the severity across users.  Without
overrides the max severity of a report is the same for all users.
@mattmundell mattmundell marked this pull request as ready for review January 25, 2021 14:15
@timopollmeier timopollmeier merged commit 6bd9ee2 into greenbone:master Jan 26, 2021
@mattmundell mattmundell deleted the count-owner branch January 26, 2021 16:34
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.

2 participants