Skip to content

Commit 2dfde28

Browse files
committed
docs: clarify publish options
Clarify the documentation in terms of what has to be configured and who, consequently, has access to what.
1 parent 8463e6b commit 2dfde28

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,26 +107,41 @@ user successfully authenticated can access all packages.
107107

108108
### Publish
109109

110-
*publish* is allowed if the package name matches the logged in user
111-
id, if the package name or scope of the package matches one of the
112-
user's groups, and the user has `auth.gitlab.publish` access rights on
113-
the group, or if the package name (possibly scoped) matches on the user's
114-
projects, and the user has `auth.gitlab.publish` access rights on
115-
the project.
110+
*publish* is allowed if:
111+
112+
1. the package name matches the GitLab username, or
113+
2. if the package name or scope of the package matches one of the
114+
user's GitLab groups, or
115+
3. if the package name (possibly scoped) matches on the user's
116+
GitLab projects.
117+
118+
For 2. and 3., the GitLab user must have the access rights on the group or
119+
project as specified in the `auth.gitlab.publish` setting.
116120

117121
For instance, assuming the following configuration:
118122

119-
- `auth.gitlab.publish` = `$maintainer`
120-
- the gitlab user `sample_user` has access to group `group1` as
121-
`$maintainer` and `group2` as `$reporter` in gitlab and has access to project
122-
`group3/project` as `$maintainer`
123-
- then this user would be able to *access* any package
124-
- *publish* any of the following npm packages in verdaccio:
123+
```yaml
124+
auth:
125+
gitlab:
126+
publish = $maintainer
127+
```
128+
129+
The GitLab user `sample_user` has access to:
130+
131+
- Group `group1` as `$maintainer`
132+
- Group `group2` as `$reporter`
133+
- Project `group3/project` as `$maintainer`
134+
135+
Then this user would be able to:
136+
137+
- *access* any package
138+
- *publish* any of the following packages:
125139
- `sample_user`
126140
- `group1`
127141
- any package under `@group1/**`
128142
- `@group3/project`
129-
- error if the user tries to publish any package under `@group2/**`
143+
144+
There would be an error if the user tried to publish any package under `@group2/**`.
130145

131146
## Configuration Options
132147

0 commit comments

Comments
 (0)