[ckan-changes] [ckan/ckan] 548ddc: fix the relationship_create auth method
GitHub
noreply at github.com
Thu Jul 20 08:19:59 UTC 2017
Branch: refs/heads/dev-v2.6
Home: https://github.com/ckan/ckan
Commit: 548ddc628f268fb5763ed511a9e8aee9d3c96847
https://github.com/ckan/ckan/commit/548ddc628f268fb5763ed511a9e8aee9d3c96847
Author: yixuan zhao <120559187 at qq.com>
Date: 2017-07-20 (Thu, 20 Jul 2017)
Changed paths:
M ckan/logic/auth/create.py
Log Message:
-----------
fix the relationship_create auth method
the code below
```
if not authorized1 and authorized2:
return {'success': False, 'msg': _('User %s not authorized to edit these packages') % user}
else:
return {'success': True}
```
didn't work when authorized1 == authorized2 == False which presented that user cannot access to both packages(datasets).
It would be : `if not False and False` -> `if True and False` -> `if Fasle`, then return `'success' : True`
More information about the ckan-changes
mailing list