Use GitLab::Access instead of ProjectFeature in frontend
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
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) This works because
featureAccessLevel.EVERYONE == 20which is the same ofGitlab::Access::Reporterbut to be consistent i think we should have something likeuserAccessLevel.REPORTERdefined somewhere and used here.I think we could open a gitlab-ce~3011693 for this if it is not already defined somehwere.