{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-python/issues/579","labels_url":"https://api.github.com/repos/getsentry/raven-python/issues/579/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-python/issues/579/comments","events_url":"https://api.github.com/repos/getsentry/raven-python/issues/579/events","html_url":"https://github.com/getsentry/raven-python/issues/579","id":62444298,"number":579,"title":"Zope contrib AttributeError getProperty on Anonymous users","user":{"login":"puittenbroek","id":1254185,"avatar_url":"https://avatars.githubusercontent.com/u/1254185?v=3","gravatar_id":"","url":"https://api.github.com/users/puittenbroek","html_url":"https://github.com/puittenbroek","followers_url":"https://api.github.com/users/puittenbroek/followers","following_url":"https://api.github.com/users/puittenbroek/following{/other_user}","gists_url":"https://api.github.com/users/puittenbroek/gists{/gist_id}","starred_url":"https://api.github.com/users/puittenbroek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puittenbroek/subscriptions","organizations_url":"https://api.github.com/users/puittenbroek/orgs","repos_url":"https://api.github.com/users/puittenbroek/repos","events_url":"https://api.github.com/users/puittenbroek/events{/privacy}","received_events_url":"https://api.github.com/users/puittenbroek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-17T16:19:45Z","updated_at":"2015-03-17T16:24:03Z","closed_at":null,"body":"Currently the code here checks is user is None or not:\r\n\r\nWhich is good, but the 'getProperty' is not always available.\r\nPlone/Zope has a 'Anonymous User\",\r\n\r\n    (Pdb) user\r\n    <SpecialUser 'Anonymous User'>\r\n    (Pdb) user.__class__\r\n    <class 'AccessControl.users.SpecialUser'>\r\n    (Pdb) user.__class__.__module__\r\n    'AccessControl.users'\r\n    (Pdb) user.getProperty\r\n    *** AttributeError: getProperty\r\n\r\nLooking at the code, best solution would be to check if the user obj is not an instance of AccessControl.users.SpecialUser."},"comment":{"url":"https://api.github.com/repos/getsentry/raven-python/issues/comments/82445716","html_url":"https://github.com/getsentry/raven-python/issues/579#issuecomment-82445716","issue_url":"https://api.github.com/repos/getsentry/raven-python/issues/579","id":82445716,"user":{"login":"puittenbroek","id":1254185,"avatar_url":"https://avatars.githubusercontent.com/u/1254185?v=3","gravatar_id":"","url":"https://api.github.com/users/puittenbroek","html_url":"https://github.com/puittenbroek","followers_url":"https://api.github.com/users/puittenbroek/followers","following_url":"https://api.github.com/users/puittenbroek/following{/other_user}","gists_url":"https://api.github.com/users/puittenbroek/gists{/gist_id}","starred_url":"https://api.github.com/users/puittenbroek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puittenbroek/subscriptions","organizations_url":"https://api.github.com/users/puittenbroek/orgs","repos_url":"https://api.github.com/users/puittenbroek/repos","events_url":"https://api.github.com/users/puittenbroek/events{/privacy}","received_events_url":"https://api.github.com/users/puittenbroek/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T16:24:03Z","updated_at":"2015-03-17T16:24:03Z","body":"Even better solution:\r\n\r\n    from AccessControl.users import nobody # at top ofc\r\n    if user is not None and user != nobody:\r\n\r\n"}}