@@ -107,26 +107,41 @@ user successfully authenticated can access all packages.
107
107
108
108
### Publish
109
109
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.
116
120
117
121
For instance, assuming the following configuration:
118
122
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:
125
139
- ` sample_user`
126
140
- ` group1`
127
141
- any package under `@group1/**`
128
142
- ` @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/**`.
130
145
131
146
# # Configuration Options
132
147
0 commit comments