{"action":"opened","issue":{"url":"https://api.github.com/repos/ViderumGlobal/ckanext-vrr/issues/3","repository_url":"https://api.github.com/repos/ViderumGlobal/ckanext-vrr","labels_url":"https://api.github.com/repos/ViderumGlobal/ckanext-vrr/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ViderumGlobal/ckanext-vrr/issues/3/comments","events_url":"https://api.github.com/repos/ViderumGlobal/ckanext-vrr/issues/3/events","html_url":"https://github.com/ViderumGlobal/ckanext-vrr/issues/3","id":393819408,"node_id":"MDU6SXNzdWUzOTM4MTk0MDg=","number":3,"title":"Password reset is not working","user":{"login":"zelima","id":15143785,"node_id":"MDQ6VXNlcjE1MTQzNzg1","avatar_url":"https://avatars3.githubusercontent.com/u/15143785?v=4","gravatar_id":"","url":"https://api.github.com/users/zelima","html_url":"https://github.com/zelima","followers_url":"https://api.github.com/users/zelima/followers","following_url":"https://api.github.com/users/zelima/following{/other_user}","gists_url":"https://api.github.com/users/zelima/gists{/gist_id}","starred_url":"https://api.github.com/users/zelima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zelima/subscriptions","organizations_url":"https://api.github.com/users/zelima/orgs","repos_url":"https://api.github.com/users/zelima/repos","events_url":"https://api.github.com/users/zelima/events{/privacy}","received_events_url":"https://api.github.com/users/zelima/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-24T06:30:19Z","updated_at":"2018-12-24T06:30:19Z","closed_at":null,"author_association":"NONE","body":"the error appears on this site https://www.openvrr.de/user/reset.\r\n\r\nAfter you write your username into the textbox and hit the “Request Reset” button, a server error appears.\r\n\r\n## Tasks\r\n\r\n* [ ] Do analysis\r\n* [ ] Update code\r\n* [ ] deploy\r\n\r\n## Analysis\r\n\r\nWe are having the internal server error on this page when trying to reset the password for user https://www.openvrr.de/user/reset The error message is pretty unexpected when you don't remember your password\r\n\r\n```\r\nNotAuthorized: You must be logged in to perform this action.\r\n```\r\n\r\nThis is caused by this line here https://github.com/ViderumGlobal/ckanext-vrr/blob/master/ckanext/vrr/action.py#L35\r\n\r\n```\r\n@toolkit.side_effect_free\r\ndef user_show(context, data_dict):\r\n    if context.get('user'):\r\n        return logic.action.get.user_show(context, data_dict)\r\n    else:\r\n        raise toolkit.NotAuthorized(\r\n            'You must be logged in to perform this action.')\r\n```\r\n\r\nI don't know why do they need to forbid, but they seem to do. But this as you can see that also leads to password reset error.\r\n\r\n### Possible solutions \r\n\r\nThis call in the core user controller call user_show: https://github.com/ckan/ckan/blob/2.8/ckan/controllers/user.py#L471. They have it restricted so it always fails. I guess that the `user_show` call in core should use `ignore_auth: True` in this case. We can patch that instance with this change and add `ignore_auth:True` to the `user_show` call in line 471 (not to the overridden function)"}}
{"actor":{"display_login":"zelima"}}