{"action":"created","issue":{"url":"https://api.github.com/repos/rlidwka/sinopia/issues/184","labels_url":"https://api.github.com/repos/rlidwka/sinopia/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/rlidwka/sinopia/issues/184/comments","events_url":"https://api.github.com/repos/rlidwka/sinopia/issues/184/events","html_url":"https://github.com/rlidwka/sinopia/issues/184","id":53258122,"number":184,"title":"Sinopia should allow existing users to be added even if maximum amount of users reached","user":{"login":"dun3","id":139409,"avatar_url":"https://avatars.githubusercontent.com/u/139409?v=3","gravatar_id":"","url":"https://api.github.com/users/dun3","html_url":"https://github.com/dun3","followers_url":"https://api.github.com/users/dun3/followers","following_url":"https://api.github.com/users/dun3/following{/other_user}","gists_url":"https://api.github.com/users/dun3/gists{/gist_id}","starred_url":"https://api.github.com/users/dun3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dun3/subscriptions","organizations_url":"https://api.github.com/users/dun3/orgs","repos_url":"https://api.github.com/users/dun3/repos","events_url":"https://api.github.com/users/dun3/events{/privacy}","received_events_url":"https://api.github.com/users/dun3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-02T15:27:53Z","updated_at":"2015-02-07T23:40:49Z","closed_at":null,"body":"##Description:\r\nSinopia does not behave like I expect, when the maximum amount of users is reached, and I want to  execute npm adduser on a new machine with **an existing user**.\r\n\r\n##Steps to reproduce:\r\nStart sinopia with default config\r\nOn client add a user \"test\" using: npm adduser --registry http://localhost:4873/ --always-auth\r\nStop sinopia\r\nEdit config, set _max_users: -1_\r\nStart sinopia\r\nOn client add a user \"test\" using: npm adduser --registry http://localhost:4873/ --always-auth\r\n\r\n##Expected:\r\nClient: npm finishes without error\r\nServer:\r\nhttp  <-- 409, user: undefined, req: 'PUT /-/user/org.couchdb.user:test', error: bad username/password, access denied\r\n http  <-- 200, user: undefined, req: 'GET /-/user/org.couchdb.user:test?write=true', bytes: 0/53\r\n http  <-- 201, user: test2, req: 'PUT /-/user/org.couchdb.user:test/-rev/undefined', bytes: 208/86\r\n\r\n##Actual:\r\nClient: \r\nnpm WARN adduser Incorrect username or password\r\nnpm WARN adduser You can reset your account by visiting:\r\nnpm WARN adduser\r\nnpm WARN adduser     https://npmjs.org/forgot\r\nnpm WARN adduser\r\nnpm ERR! Error: maximum amount of users reached : -/user/org.couchdb.user:tobiash\r\nnpm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:308:14)\r\nnpm ERR!     at Request._callback (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:246:65)\r\nnpm ERR!     at Request.self.callback (/usr/lib/node_modules/npm/node_modules/request/request.js:236:22)\r\nnpm ERR!     at Request.emit (events.js:98:17)\r\nnpm ERR!     at Request.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/request.js:1142:14)\r\nnpm ERR!     at Request.emit (events.js:117:20)\r\nnpm ERR!     at IncomingMessage.<anonymous> (/usr/lib/node_modules/npm/node_modules/request/request.js:1096:12)\r\nnpm ERR!     at IncomingMessage.emit (events.js:117:20)\r\nnpm ERR!     at _stream_readable.js:944:16\r\nnpm ERR!     at process._tickCallback (node.js:442:13)\r\nnpm ERR! If you need help, you may report this *entire* log,\r\nnpm ERR! including the npm and node versions, at:\r\nnpm ERR!     <http://github.com/npm/npm/issues>\r\n\r\nnpm ERR! System Linux 3.2.41-042stab094.8\r\nnpm ERR! command \"/usr/bin/node\" \"/usr/bin/npm\" \"adduser\" \"--registry\" \"http://localhost:4873/\" \"--always-auth\"\r\nnpm ERR! cwd /tmp/npmtest\r\nnpm ERR! node -v v0.10.35\r\nnpm ERR! npm -v 1.4.28\r\nnpm ERR!\r\nnpm ERR! Additional logging details can be found in:\r\nnpm ERR!     /tmp/npmtest/npm-debug.log\r\nnpm ERR! not ok code 0\r\n\r\nServer:\r\n http  <-- 403, user: undefined, req: 'PUT /-/user/org.couchdb.user:test', error: maximum amount of users reached\r\n"},"comment":{"url":"https://api.github.com/repos/rlidwka/sinopia/issues/comments/73389080","html_url":"https://github.com/rlidwka/sinopia/issues/184#issuecomment-73389080","issue_url":"https://api.github.com/repos/rlidwka/sinopia/issues/184","id":73389080,"user":{"login":"rondonjon","id":8258823,"avatar_url":"https://avatars.githubusercontent.com/u/8258823?v=3","gravatar_id":"","url":"https://api.github.com/users/rondonjon","html_url":"https://github.com/rondonjon","followers_url":"https://api.github.com/users/rondonjon/followers","following_url":"https://api.github.com/users/rondonjon/following{/other_user}","gists_url":"https://api.github.com/users/rondonjon/gists{/gist_id}","starred_url":"https://api.github.com/users/rondonjon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rondonjon/subscriptions","organizations_url":"https://api.github.com/users/rondonjon/orgs","repos_url":"https://api.github.com/users/rondonjon/repos","events_url":"https://api.github.com/users/rondonjon/events{/privacy}","received_events_url":"https://api.github.com/users/rondonjon/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T23:40:49Z","updated_at":"2015-02-07T23:40:49Z","body":"Same problem here ... unable to log in after installing sinopia from scratch, setting max_users to -1, adding a new user to htaccess on the server, and restarting the server.\r\n\r\nAfter reading the documentation I thought that setting max_users to -1 was to prevent people from creating new accounts. Apparently it prevents logins too. Is this really how it's meant to work?"}}