{"action":"created","comment":{"url":"https://api.github.com/repos/pulp/pulp/pulls/comments/86372551","pull_request_review_id":7033590,"id":86372551,"diff_hunk":"@@ -0,0 +1,65 @@\n+\"\"\"\n+Django models related to the Authentication system\n+\"\"\"\n+from gettext import gettext as _\n+\n+from django.core import validators\n+from django.contrib.auth.models import BaseUserManager, AbstractBaseUser, PermissionsMixin\n+from django.db import models\n+from django.utils import timezone\n+\n+\n+class PulpUserManager(BaseUserManager):\n+    \"\"\"\n+    A custom manager for PulpUser objects.\n+    \"\"\"\n+    use_in_migrations = True\n+\n+    def _create_user(self, username, password, is_superuser):\n+        \"\"\"\n+        Creates and saves a PulpUser with the given username and password.\n+        \"\"\"\n+        now = timezone.now()\n+        if not username:\n+            raise ValueError('The given username must be set')\n+        user = self.model(username=username, is_active=True, is_superuser=is_superuser,\n+                          date_joined=now)\n+        user.set_password(password)\n+        user.save(using=self._db)\n+        return user\n+\n+    def create_user(self, username, password=None):\n+        return self._create_user(username, password, False)\n+\n+    def create_superuser(self, username, password):\n+        return self._create_user(username, password, True)\n+\n+\n+class PulpUser(AbstractBaseUser, PermissionsMixin):\n+    \"\"\"\n+    A custom Django User class for Pulp.\n+    \"\"\"\n+    username = models.CharField(_('username'), max_length=150, unique=True,\n+        help_text=_('Required. 150 characters or fewer. Letters, digits and '\n+                    '@/./+/-/_ only.'),","path":"app/pulp/app/models/auth.py","position":44,"original_position":44,"commit_id":"8964b035be898afb078d20da049b550e2004a074","original_commit_id":"8964b035be898afb078d20da049b550e2004a074","user":{"login":"goosemania","id":16638409,"avatar_url":"https://avatars.githubusercontent.com/u/16638409?v=3","gravatar_id":"","url":"https://api.github.com/users/goosemania","html_url":"https://github.com/goosemania","followers_url":"https://api.github.com/users/goosemania/followers","following_url":"https://api.github.com/users/goosemania/following{/other_user}","gists_url":"https://api.github.com/users/goosemania/gists{/gist_id}","starred_url":"https://api.github.com/users/goosemania/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goosemania/subscriptions","organizations_url":"https://api.github.com/users/goosemania/orgs","repos_url":"https://api.github.com/users/goosemania/repos","events_url":"https://api.github.com/users/goosemania/events{/privacy}","received_events_url":"https://api.github.com/users/goosemania/received_events","type":"User","site_admin":false},"body":"In other models we did not specified the `help_text` in models but we did it later in serializers. For consistency (and maybe for the API docs which may use `help_text` from serializers if I am not mistaken) I suggest to move it to serializer. What do you think?","created_at":"2016-11-03T15:38:21Z","updated_at":"2016-11-03T15:51:57Z","html_url":"https://github.com/pulp/pulp/pull/2817#discussion_r86372551","pull_request_url":"https://api.github.com/repos/pulp/pulp/pulls/2817","_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments/86372551"},"html":{"href":"https://github.com/pulp/pulp/pull/2817#discussion_r86372551"},"pull_request":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2817"}}},"pull_request":{"url":"https://api.github.com/repos/pulp/pulp/pulls/2817","id":92147484,"html_url":"https://github.com/pulp/pulp/pull/2817","diff_url":"https://github.com/pulp/pulp/pull/2817.diff","patch_url":"https://github.com/pulp/pulp/pull/2817.patch","issue_url":"https://api.github.com/repos/pulp/pulp/issues/2817","number":2817,"state":"open","locked":false,"title":"Adds a custom User model to pulp.app","user":{"login":"dkliban","id":294339,"avatar_url":"https://avatars.githubusercontent.com/u/294339?v=3","gravatar_id":"","url":"https://api.github.com/users/dkliban","html_url":"https://github.com/dkliban","followers_url":"https://api.github.com/users/dkliban/followers","following_url":"https://api.github.com/users/dkliban/following{/other_user}","gists_url":"https://api.github.com/users/dkliban/gists{/gist_id}","starred_url":"https://api.github.com/users/dkliban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkliban/subscriptions","organizations_url":"https://api.github.com/users/dkliban/orgs","repos_url":"https://api.github.com/users/dkliban/repos","events_url":"https://api.github.com/users/dkliban/events{/privacy}","received_events_url":"https://api.github.com/users/dkliban/received_events","type":"User","site_admin":false},"body":"closes #2243\r\nhttps://pulp.plan.io/issues/2243","created_at":"2016-11-03T12:55:02Z","updated_at":"2016-11-03T15:51:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d215b4422e4d2120d06a700bde0b4b644cf86993","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pulp/pulp/pulls/2817/commits","review_comments_url":"https://api.github.com/repos/pulp/pulp/pulls/2817/comments","review_comment_url":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulp/pulp/issues/2817/comments","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/8964b035be898afb078d20da049b550e2004a074","head":{"label":"dkliban:user-model","ref":"user-model","sha":"8964b035be898afb078d20da049b550e2004a074","user":{"login":"dkliban","id":294339,"avatar_url":"https://avatars.githubusercontent.com/u/294339?v=3","gravatar_id":"","url":"https://api.github.com/users/dkliban","html_url":"https://github.com/dkliban","followers_url":"https://api.github.com/users/dkliban/followers","following_url":"https://api.github.com/users/dkliban/following{/other_user}","gists_url":"https://api.github.com/users/dkliban/gists{/gist_id}","starred_url":"https://api.github.com/users/dkliban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkliban/subscriptions","organizations_url":"https://api.github.com/users/dkliban/orgs","repos_url":"https://api.github.com/users/dkliban/repos","events_url":"https://api.github.com/users/dkliban/events{/privacy}","received_events_url":"https://api.github.com/users/dkliban/received_events","type":"User","site_admin":false},"repo":{"id":25177116,"name":"pulp","full_name":"dkliban/pulp","owner":{"login":"dkliban","id":294339,"avatar_url":"https://avatars.githubusercontent.com/u/294339?v=3","gravatar_id":"","url":"https://api.github.com/users/dkliban","html_url":"https://github.com/dkliban","followers_url":"https://api.github.com/users/dkliban/followers","following_url":"https://api.github.com/users/dkliban/following{/other_user}","gists_url":"https://api.github.com/users/dkliban/gists{/gist_id}","starred_url":"https://api.github.com/users/dkliban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkliban/subscriptions","organizations_url":"https://api.github.com/users/dkliban/orgs","repos_url":"https://api.github.com/users/dkliban/repos","events_url":"https://api.github.com/users/dkliban/events{/privacy}","received_events_url":"https://api.github.com/users/dkliban/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkliban/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":true,"url":"https://api.github.com/repos/dkliban/pulp","forks_url":"https://api.github.com/repos/dkliban/pulp/forks","keys_url":"https://api.github.com/repos/dkliban/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkliban/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkliban/pulp/teams","hooks_url":"https://api.github.com/repos/dkliban/pulp/hooks","issue_events_url":"https://api.github.com/repos/dkliban/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/dkliban/pulp/events","assignees_url":"https://api.github.com/repos/dkliban/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/dkliban/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/dkliban/pulp/tags","blobs_url":"https://api.github.com/repos/dkliban/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkliban/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkliban/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkliban/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkliban/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/dkliban/pulp/languages","stargazers_url":"https://api.github.com/repos/dkliban/pulp/stargazers","contributors_url":"https://api.github.com/repos/dkliban/pulp/contributors","subscribers_url":"https://api.github.com/repos/dkliban/pulp/subscribers","subscription_url":"https://api.github.com/repos/dkliban/pulp/subscription","commits_url":"https://api.github.com/repos/dkliban/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkliban/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkliban/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkliban/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkliban/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/dkliban/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkliban/pulp/merges","archive_url":"https://api.github.com/repos/dkliban/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkliban/pulp/downloads","issues_url":"https://api.github.com/repos/dkliban/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/dkliban/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/dkliban/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/dkliban/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkliban/pulp/labels{/name}","releases_url":"https://api.github.com/repos/dkliban/pulp/releases{/id}","deployments_url":"https://api.github.com/repos/dkliban/pulp/deployments","created_at":"2014-10-13T20:47:13Z","updated_at":"2015-04-03T14:29:06Z","pushed_at":"2016-11-03T14:27:18Z","git_url":"git://github.com/dkliban/pulp.git","ssh_url":"git@github.com:dkliban/pulp.git","clone_url":"https://github.com/dkliban/pulp.git","svn_url":"https://github.com/dkliban/pulp","homepage":"","size":93294,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pulp:3.0-dev","ref":"3.0-dev","sha":"41a925854a19344f8443a4bb085bb115e4d2ae2a","user":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"repo":{"id":5314652,"name":"pulp","full_name":"pulp/pulp","owner":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulp/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":false,"url":"https://api.github.com/repos/pulp/pulp","forks_url":"https://api.github.com/repos/pulp/pulp/forks","keys_url":"https://api.github.com/repos/pulp/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulp/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulp/pulp/teams","hooks_url":"https://api.github.com/repos/pulp/pulp/hooks","issue_events_url":"https://api.github.com/repos/pulp/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/pulp/pulp/events","assignees_url":"https://api.github.com/repos/pulp/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/pulp/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/pulp/pulp/tags","blobs_url":"https://api.github.com/repos/pulp/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulp/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulp/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulp/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/pulp/pulp/languages","stargazers_url":"https://api.github.com/repos/pulp/pulp/stargazers","contributors_url":"https://api.github.com/repos/pulp/pulp/contributors","subscribers_url":"https://api.github.com/repos/pulp/pulp/subscribers","subscription_url":"https://api.github.com/repos/pulp/pulp/subscription","commits_url":"https://api.github.com/repos/pulp/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulp/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulp/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulp/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulp/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/pulp/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulp/pulp/merges","archive_url":"https://api.github.com/repos/pulp/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulp/pulp/downloads","issues_url":"https://api.github.com/repos/pulp/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/pulp/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/pulp/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/pulp/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulp/pulp/labels{/name}","releases_url":"https://api.github.com/repos/pulp/pulp/releases{/id}","deployments_url":"https://api.github.com/repos/pulp/pulp/deployments","created_at":"2012-08-06T13:49:20Z","updated_at":"2016-11-03T10:59:47Z","pushed_at":"2016-11-03T14:27:19Z","git_url":"git://github.com/pulp/pulp.git","ssh_url":"git@github.com:pulp/pulp.git","clone_url":"https://github.com/pulp/pulp.git","svn_url":"https://github.com/pulp/pulp","homepage":"","size":103300,"stargazers_count":286,"watchers_count":286,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":111,"mirror_url":null,"open_issues_count":20,"forks":111,"open_issues":20,"watchers":286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2817"},"html":{"href":"https://github.com/pulp/pulp/pull/2817"},"issue":{"href":"https://api.github.com/repos/pulp/pulp/issues/2817"},"comments":{"href":"https://api.github.com/repos/pulp/pulp/issues/2817/comments"},"review_comments":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2817/comments"},"review_comment":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2817/commits"},"statuses":{"href":"https://api.github.com/repos/pulp/pulp/statuses/8964b035be898afb078d20da049b550e2004a074"}}}}
{"actor":{"display_login":"goosemania"}}