Skip to content

Commit ccf5325

Browse files
committed
feat: make allow_access behave closer to htpasswd default auth plugin
- fix functional test
1 parent 6e4c176 commit ccf5325

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,15 @@ In normal mode, packages are available:
104104

105105
#### Access
106106

107-
*access* is allowed depending on verdaccio `package` configuration
107+
*access* is allowed depending on the following verdaccio `package` configuration
108108
directives:
109109

110110
- authenticated users are able to access all packages
111111
- unauthenticated users will be able to access packages marked with either
112-
`$all` or `$anonymous` access levels
112+
`$all` or `$anonymous` access levels at the package group definition
113+
114+
Please note that no group or package name mapping is applied on access, any
115+
user successfully authenticated can access all packages.
113116

114117
#### Publish
115118

@@ -123,7 +126,8 @@ For instance, assuming the following configuration:
123126
- `auth.gitlab.publish` = `$maintainer`
124127
- the gitlab user `sample_user` has access to group `group1` as
125128
`$maintainer` and `group2` as `$reporter` in gitlab
126-
- then this user would be able to publish any of the npm packages in verdaccio:
129+
- then this user would be able to *access* any package
130+
- *publish* any of the following npm packages in verdaccio:
127131
- `sample_user`
128132
- any package under `group1/**`
129133
- error if the user tries to publish any package under `group2/**`

test/functional/auth/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default (server: any, gitlab: any) => { // eslint-disable-line no-unused-
3030
.status(HTTP_STATUS.UNAUTHORIZED)
3131
.then((body) => {
3232
expect(body).toHaveProperty('error');
33-
expect(body.error).toMatch(/invalid/);
33+
expect(body.error).toMatch(/error/);
3434
});
3535
});
3636
});

0 commit comments

Comments
 (0)