Use GitLab::Access instead of ProjectFeature in frontend

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

gitlab-ce~3412464 is using constants defined in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/pages/projects/shared/permissions/constants.js#L19 which are related to project feature to compare user access level.

We should define user access level constants or retrieve those values from backend to perform these checks, somethings like:

const userAccessLevel = {
  GUEST: 10,
  REPORTER: 20,
  DEVELOPER: 30,
  MAINTAINER: 40,
};

The following discussion from gitlab-ce!29866 should be addressed:

  • @felipe_artur started a discussion: (+1 comment)

    @rajatgitlab @kushalpandya

    This works because featureAccessLevel.EVERYONE == 20 which is the same of Gitlab::Access::Reporter but to be consistent i think we should have something like userAccessLevel.REPORTER defined somewhere and used here.

    I think we could open a gitlab-ce~3011693 for this if it is not already defined somehwere.

Edited Sep 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading