Skip to content

Set group_id and user_type for human users' personal access tokens

  • Ensure that when creating a personal access token for human user we set group_id and user_type for the new token.
  • Ensure that when rotating a personal access token for human user we set group_id and user_type for the new token.
  • Ensure that Groups::EnterpriseUsers::AssociateService that claims a user, sets group_id to the group ID for the user's personal_access_tokens.
  • Ensure that Groups::EnterpriseUsers::DisassociateService that disassociates a user from the group, sets group_id to NULL for the user's personal_access_tokens.
  • Add DB migration to set group_id based on user_details.enterprise_group_id and user_type based on users.user_type for existing human users' personal_access_tokens.
Edited by Bogdan Denkovych