Add Code Suggestions setting to user profile
What does this MR do and why?
Adds a user-level setting for enabling/disabling code suggestions.
If any of the top-level groups that the user belongs to have disabled code suggestions, it is disabled for the user.
If all of the top-level groups that the user belongs to have enabled code suggestions, the user can opt out of code suggestions via the user-level setting.
Fixes #411936 (closed)
Screenshots or screen recordings
User profile setting:
Group setting:
How to set up and validate locally
- Simulate SaaS: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitpod.md#L217
- Enable feature flags
ai_assist_ui
andai_assist_flag
- Log in as any user who does not belong to any groups
- Visit https://gdk.test:3443/-/profile/preferences
- Scroll to bottom of page and see "Code Suggestions" preference
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jessie Young