-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Notifications: Convert to classes #11296
Conversation
DryRun Security SummaryThe pull request enhances the DefectDojo application's notification system by introducing a centralized Expand for full summarySummary: The code changes in this pull request are focused on improving the notification functionality in the DefectDojo application, which is an open-source application security management tool. The changes span across several files, including the The key security-related highlights from the changes are:
Overall, the changes in this pull request demonstrate a focus on enhancing the security monitoring and alerting capabilities of the DefectDojo application, which is a crucial aspect of an effective application security management tool. Files Changed:
Code AnalysisWe ran
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple small things
dojo/notifications/helper.py
Outdated
logger.debug("creating personal notifications for event: %s", event) | ||
# There are notification like deleting a product type that shall not be sent to users. | ||
# These notifications will have the parameter no_users=True | ||
if kwargs.get("no_users") is False: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing no_users=None
~= no_users=False
?
if kwargs.get("no_users") is False: | |
if not kwargs.get("no_users"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to do more testing on this one. There is unit test coverage here for the way that it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remembered that in most cases, this value is set to False
in the call here - this where all notifications are created from within the app. The only exception is calling some of these classes directly within unit tests
To address your comment, I went with this approach: if kwargs.get("no_users", False) is False
Co-authored-by: Charles Neill <[email protected]>
Co-authored-by: Charles Neill <[email protected]>
Co-authored-by: Charles Neill <[email protected]>
Co-authored-by: Charles Neill <[email protected]>
Conflicts have been resolved. A maintainer will review the pull request shortly. |
This has been a long time coming 😄
[sc-8894]