0
Fork 0
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:
Alex Kocharin 2014-09-14 19:49:15 +04:00
parent f8b0ae6c6f
commit 8f0039de92
3 changed files with 12 additions and 4 deletions

View file

@ -171,12 +171,12 @@ function AnonymousUser() {
return {
name: undefined,
// 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) {
groups = groups.concat(['@all', '@authenticated', 'all'])
groups = groups.concat(['$all', '$authenticated', '@all', '@authenticated', 'all'])
return {
name: name,
groups: groups,

View file

@ -63,8 +63,8 @@ packages:
# allow all users to read packages (including non-authenticated users)
#
# you can specify usernames/groupnames (depending on your auth plugin)
# and three keywords: "@all", "@anonymous", "@authenticated"
allow_access: @all
# and three keywords: "$all", "$anonymous", "$authenticated"
allow_access: $all
# allow 'admin' to publish packages
allow_publish: admin

8
test/unit/config_def.js Normal file
View 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)
})
})