[ckan-changes] [ckan/ckan] ac5d91: fix the relationship_create auth method

GitHub noreply at github.com
Thu Jul 20 08:24:09 UTC 2017


  Branch: refs/heads/dev-v2.7
  Home:   https://github.com/ckan/ckan
  Commit: ac5d912af2d987fbaeb6636a087797b7ace2fea2
      https://github.com/ckan/ckan/commit/ac5d912af2d987fbaeb6636a087797b7ace2fea2
  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`


  Commit: 8643c4b1c1a5a21cd70d7515b460123d722e12a1
      https://github.com/ckan/ckan/commit/8643c4b1c1a5a21cd70d7515b460123d722e12a1
  Author: amercader <amercadero at gmail.com>
  Date:   2017-07-20 (Thu, 20 Jul 2017)

  Changed paths:
    M CHANGELOG.rst

  Log Message:
  -----------
  Update CHANGELOG


Compare: https://github.com/ckan/ckan/compare/070c12168665...8643c4b1c1a5


More information about the ckan-changes mailing list