[ckan-changes] [okfn/ckan] 5809fa: [#409] Remove authz admin functionality from contr...

GitHub noreply at github.com
Thu Feb 21 14:46:26 UTC 2013


  Branch: refs/heads/299-bug-ckanext-tests-failures
  Home:   https://github.com/okfn/ckan
  Commit: 5809fa061ebbdf6102e39f58badfabe1405203c3
      https://github.com/okfn/ckan/commit/5809fa061ebbdf6102e39f58badfabe1405203c3
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-15 (Fri, 15 Feb 2013)

  Changed paths:
    M ckan/controllers/admin.py

  Log Message:
  -----------
  [#409] Remove authz admin functionality from controller


  Commit: 313b1b3794d9d8bac0c7753b27fb444f30fdd89a
      https://github.com/okfn/ckan/commit/313b1b3794d9d8bac0c7753b27fb444f30fdd89a
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-15 (Fri, 15 Feb 2013)

  Changed paths:
    R ckan/templates/admin/authz.html

  Log Message:
  -----------
  [#409] Remove authz admin template


  Commit: f2ff8ca9d236c67ac1dd95bbb2cfae97ce86878c
      https://github.com/okfn/ckan/commit/f2ff8ca9d236c67ac1dd95bbb2cfae97ce86878c
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-15 (Fri, 15 Feb 2013)

  Changed paths:
    M ckan/templates/admin/snippets/header.html

  Log Message:
  -----------
  [#409] Remove authz admin from menu


  Commit: 61aacc8f106b13e65f48a1759e9aded019359555
      https://github.com/okfn/ckan/commit/61aacc8f106b13e65f48a1759e9aded019359555
  Author: Rufus Pollock <rufus.pollock at okfn.org>
  Date:   2013-02-15 (Fri, 15 Feb 2013)

  Changed paths:
    M ckan/config/routing.py
    R ckan/controllers/datastore.py
    R ckan/tests/functional/test_datastore.py

  Log Message:
  -----------
  [#362][s]: remove controller, routing and test code related to old (ES) datastore.

Note, have not removed (and will not remove) references to old datastore in:

* templates_legacy (assume these will get removed anyway)
* i18n (assume this will get rebuilt prior to release)


  Commit: 27361b88e1b8fe2167f83bd9cb5cf70e953ce052
      https://github.com/okfn/ckan/commit/27361b88e1b8fe2167f83bd9cb5cf70e953ce052
  Author: Rufus Pollock <rufus.pollock at okfn.org>
  Date:   2013-02-15 (Fri, 15 Feb 2013)

  Changed paths:
    M ckan/controllers/package.py
    R ckan/templates/package/resource_api_data.html
    M ckan/templates/package/snippets/data_api_button.html

  Log Message:
  -----------
  [#362,bugfix][s]: remove remaining reference to routing for old datastore (by removing api_data method in package controller).

The ultimate change was reasonably substantial - removal of an entire method on
a controller and associated template. It began simply with the need to
remove/update reference this routing call in api_data method on package
controller

    url = h.url_for('datastore_read', id=id, qualified=True)

I spent about half an hour trying to understand if this method was used at all.

I ultimately determined that we had a setup where clicking on the Data API
button in the resource view had 2 possible effect routes:

* Via href={url} => package.py/api_data method =>
  template/package/resource_api_data.html =>
  template/ajax_snippets/api_info.html
* Via JS intercept of click => api/snippets controller =>
  template/ajax_snippets/api_info.html

But there was a subtle difference: the first route (which is *not* normally
followed since JS is usally enabled) still uses the old datastore URL (this is
why I'd started this investigation!).

(Aside: this was hard to debug through the interface as JS is enabled and I
note we do not have resource view tests so the non AJAX route is not tested).

I first tried to correct this by setting the URL to the correct datastore API
but then discovered other parameters were missing - it seems the signature of
the call to ajax_snippets template has changed but that the relevant code in
package/resource_data_api.html has not been updated:

    {% snippet 'ajax_snippets/api_info.html', datastore_root_url=datastore_root_url, embedded=true %}

Rather than continue fixing I decided at this point to remove this non-AJAX
fallback code in its entirety.

Comment: this was a subtle bug that has crept in because there are now 2 ways to do
something and one of these routes (the non-AJAX route) is almost never used ...

I wonder whether it is necessary always to have both options (AJAX and
non-AJAX) as it likely to multiply code complexity and, hence, these sort of bugs.


  Commit: e8eb4ad76b0d016d5d8c6431098376fc33507504
      https://github.com/okfn/ckan/commit/e8eb4ad76b0d016d5d8c6431098376fc33507504
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-18 (Mon, 18 Feb 2013)

  Changed paths:
    M ckan/templates/package/snippets/data_api_button.html

  Log Message:
  -----------
  [#362] Fix api info for non-js browsing


  Commit: 0fe757949f244ab935e49c619f2603e16659e29b
      https://github.com/okfn/ckan/commit/0fe757949f244ab935e49c619f2603e16659e29b
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-18 (Mon, 18 Feb 2013)

  Changed paths:
    M ckan/templates/package/snippets/data_api_button.html

  Log Message:
  -----------
  [#362] Fix broken test code


  Commit: de894c0ea8e1c5ad0a23b7150760296bd57c15a1
      https://github.com/okfn/ckan/commit/de894c0ea8e1c5ad0a23b7150760296bd57c15a1
  Author: amercader <amercadero at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/templates/package/snippets/data_api_button.html

  Log Message:
  -----------
  [#362] Fix datastore active check and misleading message


  Commit: 5aab872c4925d807ad549c3e36af585e2ce73c54
      https://github.com/okfn/ckan/commit/5aab872c4925d807ad549c3e36af585e2ce73c54
  Author: John Martin <me at johnmart.in>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/controllers/admin.py
    R ckan/templates/admin/authz.html
    M ckan/templates/admin/snippets/header.html

  Log Message:
  -----------
  Merge pull request #409 from okfn/409-kill-old-admin

Remove old auth page


  Commit: 032c779d3c1455ba34603999445b3d26afebd5dd
      https://github.com/okfn/ckan/commit/032c779d3c1455ba34603999445b3d26afebd5dd
  Author: amercader <amercadero at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/config/routing.py
    R ckan/controllers/datastore.py
    M ckan/controllers/package.py
    R ckan/templates/package/resource_api_data.html
    M ckan/templates/package/snippets/data_api_button.html
    R ckan/tests/functional/test_datastore.py

  Log Message:
  -----------
  Merge branch '362-remove-old-datastore'

Conflicts:
	ckan/templates/package/snippets/data_api_button.html


  Commit: f8089c9598ff26f07b05eb7a24faf75175f333db
      https://github.com/okfn/ckan/commit/f8089c9598ff26f07b05eb7a24faf75175f333db
  Author: amercader <amercadero at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/controllers/admin.py
    R ckan/templates/admin/authz.html
    M ckan/templates/admin/snippets/header.html

  Log Message:
  -----------
  Merge branch 'master' of github.com:okfn/ckan


  Commit: 9dd058ef8f9441f5f6d0f8da5916a2812cff711c
      https://github.com/okfn/ckan/commit/9dd058ef8f9441f5f6d0f8da5916a2812cff711c
  Author: John Martin <me at johnmart.in>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/templates/organization/edit_base.html
    M ckan/templates/organization/member_new.html

  Log Message:
  -----------
  Small template tweaks


  Commit: be6c301ddf4df488f34c76d1fb9f7548252ac902
      https://github.com/okfn/ckan/commit/be6c301ddf4df488f34c76d1fb9f7548252ac902
  Author: John Martin <me at johnmart.in>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/controllers/group.py
    M ckan/new_authz.py
    M ckan/templates/organization/member_new.html
    M ckan/templates/organization/members.html

  Log Message:
  -----------
  Adds helper text and other tweaks to templates


  Commit: 01c7cc9bc146d58438e3c4b1119c09f958d62257
      https://github.com/okfn/ckan/commit/01c7cc9bc146d58438e3c4b1119c09f958d62257
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/new_authz.py

  Log Message:
  -----------
  Use ordered dict


  Commit: 4c147ad0474a8d8babd6981cc0b5e2489e14307c
      https://github.com/okfn/ckan/commit/4c147ad0474a8d8babd6981cc0b5e2489e14307c
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/logic/action/get.py
    M ckan/new_authz.py
    M ckan/templates/organization/members.html

  Log Message:
  -----------
  Translate roles


  Commit: d9022c754798acb872b2dc8ddb788cb69ae90360
      https://github.com/okfn/ckan/commit/d9022c754798acb872b2dc8ddb788cb69ae90360
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/controllers/group.py

  Log Message:
  -----------
  Fix default role


  Commit: 65e00131e7786e9233cad23aaa65a3028a2599e8
      https://github.com/okfn/ckan/commit/65e00131e7786e9233cad23aaa65a3028a2599e8
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/controllers/group.py
    M ckan/new_authz.py

  Log Message:
  -----------
  Get proper role for member edit


  Commit: 31d384534bdf3400d39641d4b7ca530ac0a3c25a
      https://github.com/okfn/ckan/commit/31d384534bdf3400d39641d4b7ca530ac0a3c25a
  Author: John Martin <me at johnmart.in>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/templates/organization/members.html

  Log Message:
  -----------
  Tweaked column width for after boostrap upgrade from master


  Commit: 14716b77366f14d6689ea46cf0ec6e5b8b6e021b
      https://github.com/okfn/ckan/commit/14716b77366f14d6689ea46cf0ec6e5b8b6e021b
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/controllers/group.py

  Log Message:
  -----------
  Fix user dict issue


  Commit: 7aed53436a4e8f31a78c0ba9b7834579dd21e3ac
      https://github.com/okfn/ckan/commit/7aed53436a4e8f31a78c0ba9b7834579dd21e3ac
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/config/routing.py

  Log Message:
  -----------
  [#423] Update related items urls


  Commit: 3e072c60416c61d9048009abafb78667b38ff888
      https://github.com/okfn/ckan/commit/3e072c60416c61d9048009abafb78667b38ff888
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/lib/plugins.py

  Log Message:
  -----------
  Use db_to_form_package_schema() by default

Make DefaultDatasetForm's db_to_form_schema() method return
db_to_form_package_schema() rather than None, so that validation against
db_to_form_package_schema() is done by default, even when there's no
IDatasetForm plugin active.

The reason for this is that bugs in db_to_form_package_schema() can
cause pages to crash, features to stop working, etc., but the tests
currently do not catch these bugs because db_to_form_package_schema() is
only used when an IDatasetForm plugin that returns a schema based on
db_to_form_package_schema() is active, and no such plugin is active when
the tests run.


  Commit: 91086acdecc7f31593f0eaaf694f1159e9be8892
      https://github.com/okfn/ckan/commit/91086acdecc7f31593f0eaaf694f1159e9be8892
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/logic/schema.py

  Log Message:
  -----------
  Show vocab tags as normal tags by default

Commit 77663865a changed the default behaviour of vocab tags so that
they are _not_ shown as normal tags (e.g. on the dataset read and search
pages). I thought this was a good idea because it's weird when you use
tag vocabulary to add a custom field, to see that tag also appear in the
normal tags. However, changing this behaviour breaks some tests, so I'm
changing it back!

If an extension is using a tag vocabulary to add a custom field, and it
doesn't want tags from that vocabulary to appear alongside normal tags,
then the extension can add the freet_tags_only converter to the schema
itself.


  Commit: e8d4013b7b494d0e2536e21998d4548043ca3a24
      https://github.com/okfn/ckan/commit/e8d4013b7b494d0e2536e21998d4548043ca3a24
  Author: tobes <toby.junk at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/lib/maintain.py

  Log Message:
  -----------
  [#267] Change debug message from info to debug


  Commit: 8abc473144816061b533d9321673834e63016c1c
      https://github.com/okfn/ckan/commit/8abc473144816061b533d9321673834e63016c1c
  Author: Dominik Moritz <domoritz at gmail.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/lib/maintain.py

  Log Message:
  -----------
  Merge pull request #367 from okfn/367-less-noise-on-app-start

Deprecation warning in default set up


  Commit: 58a24be98c25dd46588ca5bcc4ad7b51f07c4a0d
      https://github.com/okfn/ckan/commit/58a24be98c25dd46588ca5bcc4ad7b51f07c4a0d
  Author: John Glover <j at johnglover.net>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckanext/reclinepreview/theme/public/vendor/recline/recline.js
    M ckanext/reclinepreview/theme/public/vendor/recline/recline.min.js

  Log Message:
  -----------
  [#426] Update Recline to latest master.

Includes fixes for some bugs with the graph
'bars' plot.

See https://github.com/okfn/recline/pull/324
and https://github.com/okfn/recline/pull/325


  Commit: 6fd1a215238a9d89b4528d6d8f41274e2978f6e5
      https://github.com/okfn/ckan/commit/6fd1a215238a9d89b4528d6d8f41274e2978f6e5
  Author: Stefan Wehrmeyer <mail at stefanwehrmeyer.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/lib/helpers.py
    M ckan/tests/functional/test_pagination.py
    M ckan/tests/lib/test_helpers.py

  Log Message:
  -----------
  Replace all Gravatar URLs with scheme relative URLs

If the site is deployed under https the insecure
gravatar embed will prevent the browser from
showing a nice green logo. Loading everything
over the same schema is sensible.


  Commit: 051df2eb6aceb204106fd8955d259371013333fd
      https://github.com/okfn/ckan/commit/051df2eb6aceb204106fd8955d259371013333fd
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-02-20 (Wed, 20 Feb 2013)

  Changed paths:
    M ckan/lib/helpers.py
    M ckan/tests/functional/test_pagination.py
    M ckan/tests/lib/test_helpers.py

  Log Message:
  -----------
  Merge pull request #434 from okfn/secure-gravatar-url

Replace all gravatar http URLs with scheme relative URLs


  Commit: ba1d68997cf1ce1d67ac1c6893f0925337e29edb
      https://github.com/okfn/ckan/commit/ba1d68997cf1ce1d67ac1c6893f0925337e29edb
  Author: amercader <amercadero at gmail.com>
  Date:   2013-02-21 (Thu, 21 Feb 2013)

  Changed paths:
    M ckanext/reclinepreview/theme/public/vendor/recline/recline.js
    M ckanext/reclinepreview/theme/public/vendor/recline/recline.min.js

  Log Message:
  -----------
  Merge branch '426-recline-graph-fixes'


  Commit: 41a6c5b43489cd7adc956792baccc6128185643f
      https://github.com/okfn/ckan/commit/41a6c5b43489cd7adc956792baccc6128185643f
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-02-21 (Thu, 21 Feb 2013)

  Changed paths:
    M ckan/config/routing.py

  Log Message:
  -----------
  Merge pull request #423 from okfn/423-new-related-url

Related link should be called related


  Commit: b895f3e23703f4a4727e8adb63a2f9b93cdb20e9
      https://github.com/okfn/ckan/commit/b895f3e23703f4a4727e8adb63a2f9b93cdb20e9
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-02-21 (Thu, 21 Feb 2013)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/admin.py
    R ckan/controllers/datastore.py
    M ckan/controllers/group.py
    M ckan/controllers/package.py
    M ckan/lib/helpers.py
    M ckan/lib/maintain.py
    M ckan/lib/plugins.py
    M ckan/logic/action/get.py
    M ckan/logic/schema.py
    M ckan/new_authz.py
    R ckan/templates/admin/authz.html
    M ckan/templates/admin/snippets/header.html
    M ckan/templates/organization/edit_base.html
    M ckan/templates/organization/member_new.html
    M ckan/templates/organization/members.html
    R ckan/templates/package/resource_api_data.html
    M ckan/templates/package/snippets/data_api_button.html
    R ckan/tests/functional/test_datastore.py
    M ckan/tests/functional/test_pagination.py
    M ckan/tests/lib/test_helpers.py
    M ckanext/reclinepreview/theme/public/vendor/recline/recline.js
    M ckanext/reclinepreview/theme/public/vendor/recline/recline.min.js

  Log Message:
  -----------
  Merge branch 'master' into 299-bug-ckanext-tests-failures


Compare: https://github.com/okfn/ckan/compare/5822df3c6a55...b895f3e23703


More information about the ckan-changes mailing list