Default compliance framework only works for group owners

Problem

When creating a new project the user must be a group level owner otherwise the default compliance frameworks does not get applied. The compliance framework is not applied if a maintainer or developer creates the project. As maintainers and developers mostly create projects, enforcing the compliance framework is impossible.

The reason behind this is because it is using the credentials of the person who is creating the project to also set the compliance framework label.

Proposal

Investigate using other credentials, such as gitlab-bot, to set the default compliance framework when project is created. So that when a new project is created and there is a default compliance framework it is correctly applied independent of the user.

Implementation Plan

  1. Update ee/app/workers/compliance_management/update_default_framework_worker.rb to use admin_bot instead of current_user as the current_user might not have admin_compliance_framework permission.
  2. Create RSpecs where a user with developer access creates a project inside a group that has a default compliance framework set and the new project has the default framework successfully attached.
  3. Revert the documentation changes made in the MR !113634 (merged).
Edited by Huzaifa Iftikhar