📖 What does this MR do?
Adds a project selector to the personal access tokens form. This project selector will be allow users to scope their personal access tokens to one or more projects.
The backend work is not complete yet so it has no effect when submitting the form. Once the backend is completed in #15666 (closed) this field will be hooked up to the controller.
📋 Summary of changes
- Use the GitLab UI
GlTokenSelectorcomponent paired with the
projectsGraphQL query to list all the projects available to the user.
📈 Future iterations
- Add a "Project(s)" column to the table that lists all active PAT
- Wire up the frontend to the backend once the controller has been updated in #15666 (closed)
- Add a new query to get the selected projects when the component mounts. This will prevent
GlTokenSelectorfrom being cleared if there are form validation errors. This will be needed because currently the page reloads when submitting the form as opposed to submitting via Ajax.
- Update documentation
- Add feature specs
💻 Local testing
- Enable the
- Navigate to
🚦 Does this MR meet the acceptance criteria?
- [-] Changelog entry
- Not needed, behind a feature flag
- [-] Documentation (if required)
- Will be added in a future iteration
Code review guidelines
Merge request performance guidelines
- [-] Database guides
Separation of EE specific content
Availability and Testing
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
- Will ask for a security review when the backend is done
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team