GitLab Pages: Provide pages access to 'Developer' role missing 'Deploy/Pages' access
Problem to solve
GitLab projects using GitLab Pages features provide a way to share documentation with project members.
Owners and Maintainers work fine with it, the 'Deploy/Pages' page serves as the main entrypoint for the Pages URL. Optionally, the Pages URL can be documented in 'README.md', or as a project's description, but this is not mandatory.
However, the 'Deploy/Pages' tab is not visible for a 'Developer' role member, hence new developers do not have GitLab Pages access, while knowing the URL (or having documented it elsewhere) work just fine for them.
Workaround
I created a project's badge using the following settings to give easy access to the GitLab Pages documentation:
-
Name:
documentation
-
Link:
PAGES_DOMAIN:PAGES_PORT/PAGES_PATH
-
Badge image URL:
PAGES_DOMAIN:PAGES_PORT/%{project_path}/badges/%{default_branch}/pipeline.svg?key_text=documentation&key_width=105
or using shields.io:https://img.shields.io/badge/documentation-project--name-blue
Proposal
The 'Deploy/Pages' is hidden from 'Developer' and lower roles certainly due to the fact it gives settings and removal access. The settings could be hidden per-role, along the 'Remove Pages` section, to keep only 'Access pages' visible.
A new badge's image 'pages.svg' with documentation, or static badges as suggested by issue #388108 could be an alternative.
Context
Versions:
- GitLab: gitlab/gitlab-ce:16.8.1-ce.0
Configurations:
-
Visibility, project features, permissions:
- Pages: Enabled, Only Project Members