mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-27 22:59:51 -05:00
fixing bugs preventing access to upstream
This commit is contained in:
parent
102b125f14
commit
89f232b5ec
1 changed files with 3 additions and 3 deletions
|
@ -26,10 +26,10 @@ function Config(config) {
|
|||
|
||||
assert(this.storage, 'CONFIG: storage path not defined');
|
||||
|
||||
var users = {all:true};
|
||||
var users = {all:true, anonymous:true, owner:true, none:true};
|
||||
|
||||
var check_user_or_uplink = function(arg) {
|
||||
assert(arg !== 'all' || arg !== 'owner' || arg !== 'anonymous', 'CONFIG: reserved user/uplink name: ' + arg);
|
||||
assert(arg !== 'all' || arg !== 'owner' || arg !== 'anonymous' || arg !== 'none', 'CONFIG: reserved user/uplink name: ' + arg);
|
||||
assert(!arg.match(/\s/), 'CONFIG: invalid user name: ' + arg);
|
||||
assert(users[arg] == null, 'CONFIG: duplicate user/uplink name: ' + arg);
|
||||
users[arg] = true;
|
||||
|
@ -126,7 +126,7 @@ Config.prototype.proxy_access = function(package, uplink) {
|
|||
return allow_action.call(this, package, uplink, 'proxy_access') || allow_action.call(this, package, uplink, 'proxy');
|
||||
}
|
||||
|
||||
Config.prototype.proxy_access = function(package, uplink) {
|
||||
Config.prototype.proxy_publish = function(package, uplink) {
|
||||
return allow_action.call(this, package, uplink, 'proxy_publish');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue