mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-17 23:45:29 -05:00
'@all' -> '$all' (avoid yaml identifiers)
This commit is contained in:
parent
f8b0ae6c6f
commit
8f0039de92
3 changed files with 12 additions and 4 deletions
|
@ -171,12 +171,12 @@ function AnonymousUser() {
|
||||||
return {
|
return {
|
||||||
name: undefined,
|
name: undefined,
|
||||||
// groups without '@' are going to be deprecated eventually
|
// groups without '@' are going to be deprecated eventually
|
||||||
groups: ['@all', '@anonymous', 'all', 'undefined', 'anonymous'],
|
groups: ['$all', '$anonymous', '@all', '@anonymous', 'all', 'undefined', 'anonymous'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function AuthenticatedUser(name, groups) {
|
function AuthenticatedUser(name, groups) {
|
||||||
groups = groups.concat(['@all', '@authenticated', 'all'])
|
groups = groups.concat(['$all', '$authenticated', '@all', '@authenticated', 'all'])
|
||||||
return {
|
return {
|
||||||
name: name,
|
name: name,
|
||||||
groups: groups,
|
groups: groups,
|
||||||
|
|
|
@ -63,8 +63,8 @@ packages:
|
||||||
# allow all users to read packages (including non-authenticated users)
|
# allow all users to read packages (including non-authenticated users)
|
||||||
#
|
#
|
||||||
# you can specify usernames/groupnames (depending on your auth plugin)
|
# you can specify usernames/groupnames (depending on your auth plugin)
|
||||||
# and three keywords: "@all", "@anonymous", "@authenticated"
|
# and three keywords: "$all", "$anonymous", "$authenticated"
|
||||||
allow_access: @all
|
allow_access: $all
|
||||||
|
|
||||||
# allow 'admin' to publish packages
|
# allow 'admin' to publish packages
|
||||||
allow_publish: admin
|
allow_publish: admin
|
||||||
|
|
8
test/unit/config_def.js
Normal file
8
test/unit/config_def.js
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
describe('config.yaml', function() {
|
||||||
|
it('should be parseable', function() {
|
||||||
|
var source = require('fs').readFileSync(__dirname + '/../../lib/config_def.yaml', 'utf8')
|
||||||
|
require('js-yaml').safeLoad(source)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue