Add backend for persistently dismissible callouts
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?
-
Changelog entry added, if necessary - N/A Documentation created/updated
- N/A API support added
-
Tests added for this feature/bug - Review
- N/A Has been reviewed by UX
- N/A Has been reviewed by Frontend
-
Has been reviewed by Backend -
Has been reviewed by Database
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-qa
manual pipeline job)
What are the relevant issue numbers?
Related https://gitlab.com/gitlab-org/gitlab-ce/issues/41672
Edited by Eric Eastwood