Filters out project bots from invite member selections
requested to merge 355659-inviting-project-bots-project-access-token-users-to-be-members-of-projects-groups into master
What does this MR do and why?
What
- Filters out
project_bot
user types from the invite modal selection dropdown - Adds
without_project_bot
to the users API to support the filter
Why
- From a project adding a project_bot(and group bot) with the invite modal will error out as seen in the description of #355659 (closed)
- why this errors out the way reported is explained in #355659 (comment 872309230) and relates to a policy preventing project_bot types from being added in the member creation process.
- we shouldn't need to invite project_bots from the invite modal anyway as the
/-/settings/access_tokens
is used for that process as detailed in #355659 (comment 874116075)- this is also true for group bots, which are
user_type
project_bot
as well.
- this is also true for group bots, which are
New query analysis
https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/9465/commands/33571
Screenshots or screen recordings
member type | header | header |
---|---|---|
project | ![]() |
![]() |
group | ![]() |
![]() |
How to set up and validate locally
- Create a new group.
- Create a new project under that group.
- Create project bot for the group following this guide https://docs.gitlab.com/ee/user/group/settings/group_access_tokens.html#create-a-group-access-token-using-ui
- Create project bot for the project following this guide https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#create-a-project-access-token
- Attempt to invite the project bot to the project by searching for 'project' or 'bot' following this guide https://docs.gitlab.com/ee/user/project/members/#add-users-to-a-project
- Validate project bot cannot be found.
- Attempt to invite the project bot to the group by searching for 'project' or 'bot' following this guide https://docs.gitlab.com/ee/user/group/#add-users-to-a-group
- Attempt the invite steps on master and they should be found when searching, but error if trying to submit the invite.
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.
Related to #355659 (closed)
Edited by Doug Stull