{"action":"created","issue":{"url":"https://api.github.com/repos/freedombox/Plinth/issues/551","repository_url":"https://api.github.com/repos/freedombox/Plinth","labels_url":"https://api.github.com/repos/freedombox/Plinth/issues/551/labels{/name}","comments_url":"https://api.github.com/repos/freedombox/Plinth/issues/551/comments","events_url":"https://api.github.com/repos/freedombox/Plinth/issues/551/events","html_url":"https://github.com/freedombox/Plinth/issues/551","id":170889135,"number":551,"title":"Split reserved usernames list across modules","user":{"login":"jvalleroy","id":178876,"avatar_url":"https://avatars.githubusercontent.com/u/178876?v=3","gravatar_id":"","url":"https://api.github.com/users/jvalleroy","html_url":"https://github.com/jvalleroy","followers_url":"https://api.github.com/users/jvalleroy/followers","following_url":"https://api.github.com/users/jvalleroy/following{/other_user}","gists_url":"https://api.github.com/users/jvalleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/jvalleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvalleroy/subscriptions","organizations_url":"https://api.github.com/users/jvalleroy/orgs","repos_url":"https://api.github.com/users/jvalleroy/repos","events_url":"https://api.github.com/users/jvalleroy/events{/privacy}","received_events_url":"https://api.github.com/users/jvalleroy/received_events","type":"User","site_admin":false},"labels":[{"id":240134141,"url":"https://api.github.com/repos/freedombox/Plinth/labels/beginner","name":"beginner","color":"0052cc","default":false},{"id":152960844,"url":"https://api.github.com/repos/freedombox/Plinth/labels/cleanup","name":"cleanup","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-12T14:52:39Z","updated_at":"2016-10-31T16:09:31Z","closed_at":null,"body":"Currently there is a list of reserved usernames in the users module:\nhttps://github.com/freedombox/Plinth/blob/c8c6bc377b1e0831961dc626896c793beaeaa33c/plinth/modules/users/forms.py#L30\n\nIt would be better to have each module declare its own reserved username. Perhaps when each module is initialized, it would add its own reserved usernames to a common list managed by users module.\n"},"comment":{"url":"https://api.github.com/repos/freedombox/Plinth/issues/comments/257337934","html_url":"https://github.com/freedombox/Plinth/issues/551#issuecomment-257337934","issue_url":"https://api.github.com/repos/freedombox/Plinth/issues/551","id":257337934,"user":{"login":"jvalleroy","id":178876,"avatar_url":"https://avatars.githubusercontent.com/u/178876?v=3","gravatar_id":"","url":"https://api.github.com/users/jvalleroy","html_url":"https://github.com/jvalleroy","followers_url":"https://api.github.com/users/jvalleroy/followers","following_url":"https://api.github.com/users/jvalleroy/following{/other_user}","gists_url":"https://api.github.com/users/jvalleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/jvalleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvalleroy/subscriptions","organizations_url":"https://api.github.com/users/jvalleroy/orgs","repos_url":"https://api.github.com/users/jvalleroy/repos","events_url":"https://api.github.com/users/jvalleroy/events{/privacy}","received_events_url":"https://api.github.com/users/jvalleroy/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T16:09:31Z","updated_at":"2016-10-31T16:09:31Z","body":"@sounak98 See the list of reserved usernames here: https://github.com/freedombox/Plinth/blob/master/plinth/modules/users/forms.py#L31\r\n\r\nWe want to split up that list among several modules. (The modules are all the folders under https://github.com/freedombox/Plinth/tree/master/plinth/modules).\r\n\r\nWe will also need to change this function: https://github.com/freedombox/Plinth/blob/master/plinth/modules/users/forms.py#L65\r\nIt will need to loop through all the loaded modules, and check if each module has a reserved_usernames list, and then check if the new username is in that list.\r\n\r\nHope that helps. Let me know if you have questions or some part is not clear enough."}}
{"actor":{"display_login":"jvalleroy"}}