Skip to content

Remove duplicate audit event when creating project access token

What does this MR do and why?

ResourceAccessToken::CreateService invokes PersonalAccessToken::CreateService which generates a second "access token created" audit event. This event appears redundant to the end user.

This MR refactors ResourceAccessToken::CreateService to create the token itself, thus removing the extra audit event.

How to set up and validate locally

  1. Create a project access token as per the instruction
  2. Navigate to Admin Area > Monitoring > Audit Events
  3. Verify that only one audit event is created for "Created project access token"; a second "Created personal access token" event should not be created.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #333902 (closed)

Edited by Aaron Huntsman

Merge request reports

Loading