{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-airflow/issues/3508","repository_url":"https://api.github.com/repos/apache/incubator-airflow","labels_url":"https://api.github.com/repos/apache/incubator-airflow/issues/3508/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-airflow/issues/3508/comments","events_url":"https://api.github.com/repos/apache/incubator-airflow/issues/3508/events","html_url":"https://github.com/apache/incubator-airflow/pull/3508","id":332616227,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDU3MTcy","number":3508,"title":"[AIRFLOW-2624] Fix webserver login as anonymous","user":{"login":"yrqls21","id":7818710,"node_id":"MDQ6VXNlcjc4MTg3MTA=","avatar_url":"https://avatars1.githubusercontent.com/u/7818710?v=4","gravatar_id":"","url":"https://api.github.com/users/yrqls21","html_url":"https://github.com/yrqls21","followers_url":"https://api.github.com/users/yrqls21/followers","following_url":"https://api.github.com/users/yrqls21/following{/other_user}","gists_url":"https://api.github.com/users/yrqls21/gists{/gist_id}","starred_url":"https://api.github.com/users/yrqls21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yrqls21/subscriptions","organizations_url":"https://api.github.com/users/yrqls21/orgs","repos_url":"https://api.github.com/users/yrqls21/repos","events_url":"https://api.github.com/users/yrqls21/events{/privacy}","received_events_url":"https://api.github.com/users/yrqls21/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-15T01:23:39Z","updated_at":"2018-06-15T18:05:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/incubator-airflow/pulls/3508","html_url":"https://github.com/apache/incubator-airflow/pull/3508","diff_url":"https://github.com/apache/incubator-airflow/pull/3508.diff","patch_url":"https://github.com/apache/incubator-airflow/pull/3508.patch"},"body":"### JIRA\r\n- [x] My PR addresses the following [Airflow JIRA](https://issues.apache.org/jira/browse/AIRFLOW-2624) issues and references them in the PR title.\r\n\r\n### Description\r\n- [x] Here are some details about my PR, including screenshots of any UI changes:\r\n`airflow webserver` and then click on any DAG will give\r\n```\r\n  File \"/Users/kevin_yang/ext_repos/incubator-airflow/airflow/www/utils.py\", line 364, in view_func\r\n    return f(*args, **kwargs)\r\n  File \"/Users/kevin_yang/ext_repos/incubator-airflow/airflow/www/utils.py\", line 251, in wrapper\r\n    user = current_user.user.username\r\nAttributeError: 'NoneType' object has no attribute 'username'\r\n```\r\n\r\nThis fix it.\r\n\r\n### Tests\r\n- [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:\r\nManual test should be enough.\r\n\r\n### Commits\r\n- [x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from \"[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)\":\r\n    1. Subject is separated from body by a blank line\r\n    2. Subject is limited to 50 characters\r\n    3. Subject does not end with a period\r\n    4. Subject uses the imperative mood (\"add\", not \"adding\")\r\n    5. Body wraps at 72 characters\r\n    6. Body explains \"what\" and \"why\", not \"how\"\r\n\r\n\r\n### Documentation\r\n- [ ] In case of new functionality, my PR adds documentation that describes how to use it.\r\n    - When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.\r\n\r\n\r\n### Code Quality\r\n- [x] Passes `git diff upstream/master -u -- \"*.py\" | flake8 --diff`\r\n"},"comment":{"url":"https://api.github.com/repos/apache/incubator-airflow/issues/comments/397699905","html_url":"https://github.com/apache/incubator-airflow/pull/3508#issuecomment-397699905","issue_url":"https://api.github.com/repos/apache/incubator-airflow/issues/3508","id":397699905,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzY5OTkwNQ==","user":{"login":"youngyjd","id":26216756,"node_id":"MDQ6VXNlcjI2MjE2NzU2","avatar_url":"https://avatars0.githubusercontent.com/u/26216756?v=4","gravatar_id":"","url":"https://api.github.com/users/youngyjd","html_url":"https://github.com/youngyjd","followers_url":"https://api.github.com/users/youngyjd/followers","following_url":"https://api.github.com/users/youngyjd/following{/other_user}","gists_url":"https://api.github.com/users/youngyjd/gists{/gist_id}","starred_url":"https://api.github.com/users/youngyjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youngyjd/subscriptions","organizations_url":"https://api.github.com/users/youngyjd/orgs","repos_url":"https://api.github.com/users/youngyjd/repos","events_url":"https://api.github.com/users/youngyjd/events{/privacy}","received_events_url":"https://api.github.com/users/youngyjd/received_events","type":"User","site_admin":false},"created_at":"2018-06-15T18:05:12Z","updated_at":"2018-06-15T18:05:12Z","author_association":"CONTRIBUTOR","body":"qq: What authentication method did you use? In what situation that `current_user` has `user` attribute but it is `None`?"}}
{"actor":{"display_login":"youngyjd"}}