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

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


  Branch: refs/heads/master
  Home:   https://github.com/ckan/ckan
  Commit: e25e86479c0536c3e326e3a7b723455503925d3a
      https://github.com/ckan/ckan/commit/e25e86479c0536c3e326e3a7b723455503925d3a
  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: 91dbd7f287572fcdf00f4dee5fecc88516f4160b
      https://github.com/ckan/ckan/commit/91dbd7f287572fcdf00f4dee5fecc88516f4160b
  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: 09c80b28b66da4a39bf91324253ab4b89de6b271
      https://github.com/ckan/ckan/commit/09c80b28b66da4a39bf91324253ab4b89de6b271
  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: 3e37fc957fb07bab5d5f7390f70b4251044820af
      https://github.com/ckan/ckan/commit/3e37fc957fb07bab5d5f7390f70b4251044820af
  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: b9c4e4cda5f6d7acfea4c654650ccfc0b175f7c4
      https://github.com/ckan/ckan/commit/b9c4e4cda5f6d7acfea4c654650ccfc0b175f7c4
  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


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

  Changed paths:
    M ckan/logic/auth/__init__.py
    A ckan/new_tests/logic/auth/test_init.py
    M ckanext/datapusher/logic/action.py
    M ckanext/datapusher/tests/test.py

  Log Message:
  -----------
  Merge pull request #1488 from ckan/1488-more-robust-get-object-in-auth

Auth helper function `_get_object` is evil [#1487 + #1488]


Compare: https://github.com/ckan/ckan/compare/c536671dbafe...f49cb0ab8f97


More information about the ckan-changes mailing list