[ckan-changes] [ckan/ckan] d4992f: [#1488] Make get_*_object helper functions more ro...

GitHub noreply at github.com
Mon Feb 3 14:08:08 UTC 2014


  Branch: refs/heads/release-v2.2
  Home:   https://github.com/ckan/ckan
  Commit: d4992fe6b31657dcf3922084046994fd30d9d6af
      https://github.com/ckan/ckan/commit/d4992fe6b31657dcf3922084046994fd30d9d6af
  Author: amercader <amercadero at gmail.com>
  Date:   2014-02-03 (Mon, 03 Feb 2014)

  Changed paths:
    M ckan/logic/auth/__init__.py
    M ckan/new_tests/logic/auth/__init__.py

  Log Message:
  -----------
  [#1488] Make get_*_object helper functions more robust

When functions like `get_resource_object` got an empty id (eg because of
a bug higher up in the logic layer) they returned a random object (the
most recent one on the DB), causing rally hard to debug bugs.

The functions now raise a ValidationError if an id is not provided.


  Commit: c15b53066e9b6d8b5dccf623b91f503c601d0b77
      https://github.com/ckan/ckan/commit/c15b53066e9b6d8b5dccf623b91f503c601d0b77
  Author: amercader <amercadero at gmail.com>
  Date:   2014-02-03 (Mon, 03 Feb 2014)

  Changed paths:
    M ckan/new_tests/logic/auth/__init__.py

  Log Message:
  -----------
  [#1488] Fix coding standards test


  Commit: 325a7b5329e8beb2821d15df7d41c3b64fe451a2
      https://github.com/ckan/ckan/commit/325a7b5329e8beb2821d15df7d41c3b64fe451a2
  Author: amercader <amercadero at gmail.com>
  Date:   2014-02-03 (Mon, 03 Feb 2014)

  Changed paths:
    M ckanext/datapusher/logic/action.py
    M ckanext/datapusher/tests/test.py

  Log Message:
  -----------
  [#1487] Fix auhtorization in datapusher_hook

We were passing data_dict to the auth function, which didn't contain the
necessary resource_id to perform the auth checks later on. Sadly #1488
was hiding this and the auth check passed or failed randomly


  Commit: 638adf8f31d7d1484b0ab0f6cd5d12165c9b08fb
      https://github.com/ckan/ckan/commit/638adf8f31d7d1484b0ab0f6cd5d12165c9b08fb
  Author: amercader <amercadero at gmail.com>
  Date:   2014-02-03 (Mon, 03 Feb 2014)

  Changed paths:
    M ckan/new_tests/logic/auth/__init__.py
    A ckan/new_tests/logic/auth/test_init.py

  Log Message:
  -----------
  [#1488] Move tests where they will actually get run


  Commit: 19f3db0ed3338e33f56bfc5aef547cb2c73b1487
      https://github.com/ckan/ckan/commit/19f3db0ed3338e33f56bfc5aef547cb2c73b1487
  Author: amercader <amercadero at gmail.com>
  Date:   2014-02-03 (Mon, 03 Feb 2014)

  Changed paths:
    M ckan/new_tests/logic/auth/test_init.py

  Log Message:
  -----------
  [#1488] Remove debug junk


Compare: https://github.com/ckan/ckan/compare/7eba75e670b4...19f3db0ed333


More information about the ckan-changes mailing list