{"action":"created","issue":{"url":"https://api.github.com/repos/chriswhong/ReallySimpleOpenData/issues/10","labels_url":"https://api.github.com/repos/chriswhong/ReallySimpleOpenData/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/chriswhong/ReallySimpleOpenData/issues/10/comments","events_url":"https://api.github.com/repos/chriswhong/ReallySimpleOpenData/issues/10/events","html_url":"https://github.com/chriswhong/ReallySimpleOpenData/issues/10","id":120322044,"number":10,"title":"All users should be admins","user":{"login":"chriswhong","id":1833820,"avatar_url":"https://avatars.githubusercontent.com/u/1833820?v=3","gravatar_id":"","url":"https://api.github.com/users/chriswhong","html_url":"https://github.com/chriswhong","followers_url":"https://api.github.com/users/chriswhong/followers","following_url":"https://api.github.com/users/chriswhong/following{/other_user}","gists_url":"https://api.github.com/users/chriswhong/gists{/gist_id}","starred_url":"https://api.github.com/users/chriswhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriswhong/subscriptions","organizations_url":"https://api.github.com/users/chriswhong/orgs","repos_url":"https://api.github.com/users/chriswhong/repos","events_url":"https://api.github.com/users/chriswhong/events{/privacy}","received_events_url":"https://api.github.com/users/chriswhong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-04T03:04:32Z","updated_at":"2015-12-04T14:59:59Z","closed_at":null,"body":"There is no concept of a non-admin user in RSOD, so how do I make it so that people can't just register a new user on their own?\r\n\r\nThe workflow should be to prompt the user for the creation of an admin account on first run, then that account can create new admin accounts. \r\n\r\nThe \"Users\" will never need to log in."},"comment":{"url":"https://api.github.com/repos/chriswhong/ReallySimpleOpenData/issues/comments/161987440","html_url":"https://github.com/chriswhong/ReallySimpleOpenData/issues/10#issuecomment-161987440","issue_url":"https://api.github.com/repos/chriswhong/ReallySimpleOpenData/issues/10","id":161987440,"user":{"login":"chriswhong","id":1833820,"avatar_url":"https://avatars.githubusercontent.com/u/1833820?v=3","gravatar_id":"","url":"https://api.github.com/users/chriswhong","html_url":"https://github.com/chriswhong","followers_url":"https://api.github.com/users/chriswhong/followers","following_url":"https://api.github.com/users/chriswhong/following{/other_user}","gists_url":"https://api.github.com/users/chriswhong/gists{/gist_id}","starred_url":"https://api.github.com/users/chriswhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriswhong/subscriptions","organizations_url":"https://api.github.com/users/chriswhong/orgs","repos_url":"https://api.github.com/users/chriswhong/repos","events_url":"https://api.github.com/users/chriswhong/events{/privacy}","received_events_url":"https://api.github.com/users/chriswhong/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T14:59:59Z","updated_at":"2015-12-04T14:59:59Z","body":"Thanks!  I guess I just need to turn off the public API for registering and\nthat should be enough, right?  Then just a UI for the \"first admin\" to\ncreate new admin accounts and a secure api for that?\n\nSo the first admin account creation will be insecure, and whoever executes\nfirstrun will be able to create the \"first admin\" user?\n\nOn Fri, Dec 4, 2015 at 9:44 AM, Nick Doiron <notifications@github.com>\nwrote:\n\n> So you're already using Passport\n>\n> Think about how creating a non-editable table/collection which is just a\n> list of admin users. Then users can still be open data, but this admin\n> table would be uneditable once admins.count() >= 1\n>\n> Making this idea simpler, you could make the users collection editable up\n> until one account was set to be admin - users.count({isAdmin: true}), and\n> from then on you need to have isAdmin: true set to make edits\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/chriswhong/ReallySimpleOpenData/issues/10#issuecomment-161983434>\n> .\n>\n"}}