{"action":"opened","number":2816,"pull_request":{"url":"https://api.github.com/repos/torchbox/wagtail/pulls/2816","id":76105766,"html_url":"https://github.com/torchbox/wagtail/pull/2816","diff_url":"https://github.com/torchbox/wagtail/pull/2816.diff","patch_url":"https://github.com/torchbox/wagtail/pull/2816.patch","issue_url":"https://api.github.com/repos/torchbox/wagtail/issues/2816","number":2816,"state":"open","locked":false,"title":"Fix for custom users without the 'is_staff' field","user":{"login":"SableWalnut","id":10582038,"avatar_url":"https://avatars.githubusercontent.com/u/10582038?v=3","gravatar_id":"","url":"https://api.github.com/users/SableWalnut","html_url":"https://github.com/SableWalnut","followers_url":"https://api.github.com/users/SableWalnut/followers","following_url":"https://api.github.com/users/SableWalnut/following{/other_user}","gists_url":"https://api.github.com/users/SableWalnut/gists{/gist_id}","starred_url":"https://api.github.com/users/SableWalnut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SableWalnut/subscriptions","organizations_url":"https://api.github.com/users/SableWalnut/orgs","repos_url":"https://api.github.com/users/SableWalnut/repos","events_url":"https://api.github.com/users/SableWalnut/events{/privacy}","received_events_url":"https://api.github.com/users/SableWalnut/received_events","type":"User","site_admin":false},"body":"Currently when using a custom user without the `is_staff` field, the error `can't set attribute` will be raised, as upon saving a user in wagtail admin, the save function will attempt to set `user.is_staff` to the value of `user.is_superuser`. For example my custom user had something like this.\r\n```\r\n    @property\r\n    def is_staff(self):\r\n        \"Is the user a member of staff?\"\r\n        # Simplest possible answer: All admins are staff\r\n        return self.is_admin\r\n```\r\n\r\nI'll add tests if there's no problems with what I've got so far.","created_at":"2016-07-04T02:12:23Z","updated_at":"2016-07-04T02:12:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9dcebb87cdb9e367417170c24a7af7d9832652c9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/torchbox/wagtail/pulls/2816/commits","review_comments_url":"https://api.github.com/repos/torchbox/wagtail/pulls/2816/comments","review_comment_url":"https://api.github.com/repos/torchbox/wagtail/pulls/comments{/number}","comments_url":"https://api.github.com/repos/torchbox/wagtail/issues/2816/comments","statuses_url":"https://api.github.com/repos/torchbox/wagtail/statuses/8a7290b20d3f54d15d1f5023f9e41024993333ea","head":{"label":"takeflight:user-fix","ref":"user-fix","sha":"8a7290b20d3f54d15d1f5023f9e41024993333ea","user":{"login":"takeflight","id":7663899,"avatar_url":"https://avatars.githubusercontent.com/u/7663899?v=3","gravatar_id":"","url":"https://api.github.com/users/takeflight","html_url":"https://github.com/takeflight","followers_url":"https://api.github.com/users/takeflight/followers","following_url":"https://api.github.com/users/takeflight/following{/other_user}","gists_url":"https://api.github.com/users/takeflight/gists{/gist_id}","starred_url":"https://api.github.com/users/takeflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takeflight/subscriptions","organizations_url":"https://api.github.com/users/takeflight/orgs","repos_url":"https://api.github.com/users/takeflight/repos","events_url":"https://api.github.com/users/takeflight/events{/privacy}","received_events_url":"https://api.github.com/users/takeflight/received_events","type":"Organization","site_admin":false},"repo":{"id":20045486,"name":"wagtail","full_name":"takeflight/wagtail","owner":{"login":"takeflight","id":7663899,"avatar_url":"https://avatars.githubusercontent.com/u/7663899?v=3","gravatar_id":"","url":"https://api.github.com/users/takeflight","html_url":"https://github.com/takeflight","followers_url":"https://api.github.com/users/takeflight/followers","following_url":"https://api.github.com/users/takeflight/following{/other_user}","gists_url":"https://api.github.com/users/takeflight/gists{/gist_id}","starred_url":"https://api.github.com/users/takeflight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takeflight/subscriptions","organizations_url":"https://api.github.com/users/takeflight/orgs","repos_url":"https://api.github.com/users/takeflight/repos","events_url":"https://api.github.com/users/takeflight/events{/privacy}","received_events_url":"https://api.github.com/users/takeflight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/takeflight/wagtail","description":"A new Django content management system","fork":true,"url":"https://api.github.com/repos/takeflight/wagtail","forks_url":"https://api.github.com/repos/takeflight/wagtail/forks","keys_url":"https://api.github.com/repos/takeflight/wagtail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/takeflight/wagtail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/takeflight/wagtail/teams","hooks_url":"https://api.github.com/repos/takeflight/wagtail/hooks","issue_events_url":"https://api.github.com/repos/takeflight/wagtail/issues/events{/number}","events_url":"https://api.github.com/repos/takeflight/wagtail/events","assignees_url":"https://api.github.com/repos/takeflight/wagtail/assignees{/user}","branches_url":"https://api.github.com/repos/takeflight/wagtail/branches{/branch}","tags_url":"https://api.github.com/repos/takeflight/wagtail/tags","blobs_url":"https://api.github.com/repos/takeflight/wagtail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/takeflight/wagtail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/takeflight/wagtail/git/refs{/sha}","trees_url":"https://api.github.com/repos/takeflight/wagtail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/takeflight/wagtail/statuses/{sha}","languages_url":"https://api.github.com/repos/takeflight/wagtail/languages","stargazers_url":"https://api.github.com/repos/takeflight/wagtail/stargazers","contributors_url":"https://api.github.com/repos/takeflight/wagtail/contributors","subscribers_url":"https://api.github.com/repos/takeflight/wagtail/subscribers","subscription_url":"https://api.github.com/repos/takeflight/wagtail/subscription","commits_url":"https://api.github.com/repos/takeflight/wagtail/commits{/sha}","git_commits_url":"https://api.github.com/repos/takeflight/wagtail/git/commits{/sha}","comments_url":"https://api.github.com/repos/takeflight/wagtail/comments{/number}","issue_comment_url":"https://api.github.com/repos/takeflight/wagtail/issues/comments{/number}","contents_url":"https://api.github.com/repos/takeflight/wagtail/contents/{+path}","compare_url":"https://api.github.com/repos/takeflight/wagtail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/takeflight/wagtail/merges","archive_url":"https://api.github.com/repos/takeflight/wagtail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/takeflight/wagtail/downloads","issues_url":"https://api.github.com/repos/takeflight/wagtail/issues{/number}","pulls_url":"https://api.github.com/repos/takeflight/wagtail/pulls{/number}","milestones_url":"https://api.github.com/repos/takeflight/wagtail/milestones{/number}","notifications_url":"https://api.github.com/repos/takeflight/wagtail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/takeflight/wagtail/labels{/name}","releases_url":"https://api.github.com/repos/takeflight/wagtail/releases{/id}","deployments_url":"https://api.github.com/repos/takeflight/wagtail/deployments","created_at":"2014-05-22T02:47:56Z","updated_at":"2015-04-23T01:24:37Z","pushed_at":"2016-07-04T02:07:02Z","git_url":"git://github.com/takeflight/wagtail.git","ssh_url":"git@github.com:takeflight/wagtail.git","clone_url":"https://github.com/takeflight/wagtail.git","svn_url":"https://github.com/takeflight/wagtail","homepage":"wagtail.io","size":34675,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"torchbox:master","ref":"master","sha":"f014332a521bf33c80511b6995c0624dde8d9cdd","user":{"login":"torchbox","id":84015,"avatar_url":"https://avatars.githubusercontent.com/u/84015?v=3","gravatar_id":"","url":"https://api.github.com/users/torchbox","html_url":"https://github.com/torchbox","followers_url":"https://api.github.com/users/torchbox/followers","following_url":"https://api.github.com/users/torchbox/following{/other_user}","gists_url":"https://api.github.com/users/torchbox/gists{/gist_id}","starred_url":"https://api.github.com/users/torchbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torchbox/subscriptions","organizations_url":"https://api.github.com/users/torchbox/orgs","repos_url":"https://api.github.com/users/torchbox/repos","events_url":"https://api.github.com/users/torchbox/events{/privacy}","received_events_url":"https://api.github.com/users/torchbox/received_events","type":"Organization","site_admin":false},"repo":{"id":16479108,"name":"wagtail","full_name":"torchbox/wagtail","owner":{"login":"torchbox","id":84015,"avatar_url":"https://avatars.githubusercontent.com/u/84015?v=3","gravatar_id":"","url":"https://api.github.com/users/torchbox","html_url":"https://github.com/torchbox","followers_url":"https://api.github.com/users/torchbox/followers","following_url":"https://api.github.com/users/torchbox/following{/other_user}","gists_url":"https://api.github.com/users/torchbox/gists{/gist_id}","starred_url":"https://api.github.com/users/torchbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torchbox/subscriptions","organizations_url":"https://api.github.com/users/torchbox/orgs","repos_url":"https://api.github.com/users/torchbox/repos","events_url":"https://api.github.com/users/torchbox/events{/privacy}","received_events_url":"https://api.github.com/users/torchbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/torchbox/wagtail","description":"A Django content management system focused on flexibility and user experience","fork":false,"url":"https://api.github.com/repos/torchbox/wagtail","forks_url":"https://api.github.com/repos/torchbox/wagtail/forks","keys_url":"https://api.github.com/repos/torchbox/wagtail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/torchbox/wagtail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/torchbox/wagtail/teams","hooks_url":"https://api.github.com/repos/torchbox/wagtail/hooks","issue_events_url":"https://api.github.com/repos/torchbox/wagtail/issues/events{/number}","events_url":"https://api.github.com/repos/torchbox/wagtail/events","assignees_url":"https://api.github.com/repos/torchbox/wagtail/assignees{/user}","branches_url":"https://api.github.com/repos/torchbox/wagtail/branches{/branch}","tags_url":"https://api.github.com/repos/torchbox/wagtail/tags","blobs_url":"https://api.github.com/repos/torchbox/wagtail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/torchbox/wagtail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/torchbox/wagtail/git/refs{/sha}","trees_url":"https://api.github.com/repos/torchbox/wagtail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/torchbox/wagtail/statuses/{sha}","languages_url":"https://api.github.com/repos/torchbox/wagtail/languages","stargazers_url":"https://api.github.com/repos/torchbox/wagtail/stargazers","contributors_url":"https://api.github.com/repos/torchbox/wagtail/contributors","subscribers_url":"https://api.github.com/repos/torchbox/wagtail/subscribers","subscription_url":"https://api.github.com/repos/torchbox/wagtail/subscription","commits_url":"https://api.github.com/repos/torchbox/wagtail/commits{/sha}","git_commits_url":"https://api.github.com/repos/torchbox/wagtail/git/commits{/sha}","comments_url":"https://api.github.com/repos/torchbox/wagtail/comments{/number}","issue_comment_url":"https://api.github.com/repos/torchbox/wagtail/issues/comments{/number}","contents_url":"https://api.github.com/repos/torchbox/wagtail/contents/{+path}","compare_url":"https://api.github.com/repos/torchbox/wagtail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/torchbox/wagtail/merges","archive_url":"https://api.github.com/repos/torchbox/wagtail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/torchbox/wagtail/downloads","issues_url":"https://api.github.com/repos/torchbox/wagtail/issues{/number}","pulls_url":"https://api.github.com/repos/torchbox/wagtail/pulls{/number}","milestones_url":"https://api.github.com/repos/torchbox/wagtail/milestones{/number}","notifications_url":"https://api.github.com/repos/torchbox/wagtail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/torchbox/wagtail/labels{/name}","releases_url":"https://api.github.com/repos/torchbox/wagtail/releases{/id}","deployments_url":"https://api.github.com/repos/torchbox/wagtail/deployments","created_at":"2014-02-03T12:41:59Z","updated_at":"2016-07-03T17:02:11Z","pushed_at":"2016-07-04T02:12:24Z","git_url":"git://github.com/torchbox/wagtail.git","ssh_url":"git@github.com:torchbox/wagtail.git","clone_url":"https://github.com/torchbox/wagtail.git","svn_url":"https://github.com/torchbox/wagtail","homepage":"wagtail.io","size":44291,"stargazers_count":3555,"watchers_count":3555,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":675,"mirror_url":null,"open_issues_count":498,"forks":675,"open_issues":498,"watchers":3555,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/torchbox/wagtail/pulls/2816"},"html":{"href":"https://github.com/torchbox/wagtail/pull/2816"},"issue":{"href":"https://api.github.com/repos/torchbox/wagtail/issues/2816"},"comments":{"href":"https://api.github.com/repos/torchbox/wagtail/issues/2816/comments"},"review_comments":{"href":"https://api.github.com/repos/torchbox/wagtail/pulls/2816/comments"},"review_comment":{"href":"https://api.github.com/repos/torchbox/wagtail/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/torchbox/wagtail/pulls/2816/commits"},"statuses":{"href":"https://api.github.com/repos/torchbox/wagtail/statuses/8a7290b20d3f54d15d1f5023f9e41024993333ea"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":3,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"SableWalnut"}}