Skip to content

Rename and moved security training promo banner

Samantha Ming requested to merge 373025-move-security_training_promo into master

What does this MR do and why?

This MR is part of an effort to introduce a shared security_training_promo.vue component that will be used in both the project vulnerability report page and for the MR widget.

Please see this implementation plan for more details > #373025 (closed)

In this MR, we rename and move the current vulnerability security_training_promo.vue.

- ee/app/assets/javascripts/security_dashboard/components/shared/security_training_promo.vue
+ ee/app/assets/javascripts/security_dashboard/components/project/security_training_promo_banner.vue

thought: since this component is only used on the project page, I don't think it needs to live in the shared folder.

Screenshots or screen recordings

There is no UI/UX change in this MR. All functionalities remain the same.

image

How to set up and validate locally

All the existing behaviors should exist:

  1. Go to a project's vulnerability report (Project > Security & Compliance > Vulnerability report)
  2. You will see the promo banner
  3. To test the dismissal, open a new browser tab and go to the same project's security dashboard
  4. Close the banner on the vulnerability report, refresh both pages - the banner should not be visible on either
  5. To reset the dismissal state and try closing it again do (just replace "root" with your gdk's username):
echo 'User.find_by(username: "root").callouts.find_by(feature_name: "security_training_feature_promotion").destroy' | rails c

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #373025 (closed)

Edited by Samantha Ming

Merge request reports

Loading