[ckan-changes] [okfn/ckan] f6da51: Change default authorization settings

GitHub noreply at github.com
Mon Jul 9 15:44:09 UTC 2012


  Branch: refs/heads/2388-out-of-the-box-auth-settings
  Home:   https://github.com/okfn/ckan
  Commit: f6da5124e79d5aad6c14b5e4451e5eae07fdac9e
      https://github.com/okfn/ckan/commit/f6da5124e79d5aad6c14b5e4451e5eae07fdac9e
  Author: amercader <amercadero at gmail.com>
  Date:   2012-07-09 (Mon, 09 Jul 2012)

  Changed paths:
    M ckan/config/deployment.ini_tmpl
    M ckan/model/authz.py

  Log Message:
  -----------
  Change default authorization settings

These are the new default authotization behaviours:

* Only logged in users are able to create datasets and upload files
* Only the user that created the dataset can edit it by default

NB: this will break a large number of test. They will be fixed on
following commits.


  Commit: b55c85e4fbc975c4e46dad1c15151ede3f0a6b06
      https://github.com/okfn/ckan/commit/b55c85e4fbc975c4e46dad1c15151ede3f0a6b06
  Author: amercader <amercadero at gmail.com>
  Date:   2012-07-09 (Mon, 09 Jul 2012)

  Changed paths:
    M ckan/tests/forms/test_authz.py
    M ckan/tests/functional/api/test_activity.py
    M ckan/tests/functional/test_admin.py
    M ckan/tests/functional/test_authz.py
    M ckan/tests/functional/test_home.py
    M ckan/tests/functional/test_package.py
    M ckan/tests/functional/test_package_edit_authz.py
    M ckan/tests/functional/test_search.py
    M ckan/tests/functional/test_storage.py
    M ckan/tests/functional/test_upload.py
    M ckan/tests/logic/test_action.py
    M ckan/tests/models/test_authz.py
    M ckan/tests/models/test_repo.py

  Log Message:
  -----------
  Fix broken tests after default auth settings change

All tests involving non logged-in editing were failing, as this is no
longer allowed. The changes on auth settings basically mean than
everytime some editing is tested, a valid user with permissions on the
dataset must be provided, e.g.:

    offset = url_for(controller='package', action='edit', id=myid)
    self.app.get(offset,extra_environ={'REMOTE_USER': 'russianfan'})

or:

    res = self.app.post('/api/action/resource_create', params=postparams,
                   extra_environ={'Authorization': api_key })


Compare: https://github.com/okfn/ckan/compare/f6da5124e79d^...b55c85e4fbc9


More information about the ckan-changes mailing list