Skip to content

Add backend for persistently dismissible callouts

Matija Čupić requested to merge persistent-callouts into master

What does this MR do?

EE MR, https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4356

Adds backend support for persistently dismissable callouts.

Are there points in the code the reviewer needs to double check?

We could maybe create a service for dismissing the callouts to move the logic out of the controller, but that might overkill considering how little logic is there.

Example Usage

Method: POST
Path: callouts_dismiss (callouts_dismiss_path), user_callouts_path Payload: feature_name as POST parameter

To remove the dismissal execute this in the rails console (bundle exec rails c):
Callout.find_by(user: USER, feature_name: FEATURE_NAME).update(dismissed_state: false) UserCallout.find_by(user: USER, feature_name: FEATURE_NAME).update(dismissed_state: false)

  • USER is the USER object for the user you want to reset the dismissal - e.g. User.find_by(username: 'root')
  • FEATURE_NAME is a string representing the feature name

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Related https://gitlab.com/gitlab-org/gitlab-ce/issues/41672

Edited by Eric Eastwood

Merge request reports