[ckan-changes] [okfn/ckan] 1586f3: [#1184] Remove auth_sysadmins_check decorator from...

GitHub noreply at github.com
Tue Nov 5 17:15:27 UTC 2013


  Branch: refs/heads/release-v2.1.1
  Home:   https://github.com/okfn/ckan
  Commit: 1586f3830e4cb3d017dfdf42e2cfdd15b8b905b2
      https://github.com/okfn/ckan/commit/1586f3830e4cb3d017dfdf42e2cfdd15b8b905b2
  Author: amercader <amercadero at gmail.com>
  Date:   2013-10-28 (Mon, 28 Oct 2013)

  Changed paths:
    M ckan/logic/auth/create.py

  Log Message:
  -----------
  [#1184] Remove auth_sysadmins_check decorator from package_create

There is no reason why sysadmins should need to use the auth function.


  Commit: 212e000c6540589cd2360350fbac032c754999fb
      https://github.com/okfn/ckan/commit/212e000c6540589cd2360350fbac032c754999fb
  Author: amercader <amercadero at gmail.com>
  Date:   2013-10-28 (Mon, 28 Oct 2013)

  Changed paths:
    M ckan/logic/auth/create.py
    M ckan/logic/auth/update.py
    M ckan/new_authz.py

  Log Message:
  -----------
  [#1184] Update user checks in package create and update auth functions

The `auth_is_registered_user` function's name is misleading, as it only checks
if there is a user on the Pylons context object (ie if it is logged in).
It has been renamed to `auth_is_loggedin_user`, keeping the old as
deprecated. The function is not used anymore on the auth functions, as
the user should be always present in the context dict passed to the
functions (The controller sets context['user'] to c.user).

Conflicts:

	ckan/new_authz.py


  Commit: f73acc720644f8bfbfa2c3291b54137ce7520d96
      https://github.com/okfn/ckan/commit/f73acc720644f8bfbfa2c3291b54137ce7520d96
  Author: amercader <amercadero at gmail.com>
  Date:   2013-10-28 (Mon, 28 Oct 2013)

  Changed paths:
    M ckan/tests/functional/test_package.py

  Log Message:
  -----------
  [#1184] Fix failing test due to not providing the user


  Commit: 519a30fead677e6435c6f25d3a4c354ff3ebf236
      https://github.com/okfn/ckan/commit/519a30fead677e6435c6f25d3a4c354ff3ebf236
  Author: amercader <amercadero at gmail.com>
  Date:   2013-10-28 (Mon, 28 Oct 2013)

  Changed paths:
    M ckan/logic/auth/create.py
    M ckan/logic/auth/update.py
    M ckan/new_authz.py

  Log Message:
  -----------
  [#1184] Revert 243cd1c with a better anon user check

Due to how the controllers set up the user in the context it was
impossible with the current logic to identify an anonymous request on
the auth functions.
On ckan/lib/base.py:232 the following are set on the pylons context object
(c):

* Anon request (not logged in):
    c.user = None
    c.author = IP (or 'Unknown IP Address')
* Logged in user:
    c.user = User name
    c.author = User name

Once in the controllers, these are normally used in:

    context = {'user': c.user or c.auhtor}

That means that once in the auth functions we need way to check if
a call is anonymous that works both for requests made via the web
(object c) or called directly from an extension, where the user is
defined directly on the context. The new `auth_is_anon_user` function
does that.

Ideally this should be handled automatically at a higher level, and the
logic layer should always work with users defined on the context object.


  Commit: 18b18feaec1437354718f15f12eef54475ddf34d
      https://github.com/okfn/ckan/commit/18b18feaec1437354718f15f12eef54475ddf34d
  Author: amercader <amercadero at gmail.com>
  Date:   2013-10-28 (Mon, 28 Oct 2013)

  Changed paths:
    M ckan/plugins/toolkit.py

  Log Message:
  -----------
  [#1241] Raise CkanVersionException properly


  Commit: fc52d4a2dfd8bf26714c289d88e50bef142bc769
      https://github.com/okfn/ckan/commit/fc52d4a2dfd8bf26714c289d88e50bef142bc769
  Author: kindly <kindly at gmail.com>
  Date:   2013-10-28 (Mon, 28 Oct 2013)

  Changed paths:
    M ckan/config/middleware.py

  Log Message:
  -----------
  [#1192] ust get to get headers


  Commit: 2e64943441fe80749028e87afbde5e6128851a68
      https://github.com/okfn/ckan/commit/2e64943441fe80749028e87afbde5e6128851a68
  Author: amercader <amercadero at gmail.com>
  Date:   2013-11-05 (Tue, 05 Nov 2013)

  Changed paths:
    M ckan/logic/action/get.py
    M ckan/tests/logic/test_action.py

  Log Message:
  -----------
  [#1295] Don't return private datasets on package_list


  Commit: f0478b994e0a41fa220e1d8f87af828ad60660f4
      https://github.com/okfn/ckan/commit/f0478b994e0a41fa220e1d8f87af828ad60660f4
  Author: Dominik Moritz <domoritz at gmail.com>
  Date:   2013-11-05 (Tue, 05 Nov 2013)

  Changed paths:
    M ckanext/resourceproxy/controller.py
    M ckanext/resourceproxy/tests/test_proxy.py

  Log Message:
  -----------
  [#1106] Don't accept invalid URLs in resource proxy


  Commit: 6a5893bc7cc2935310b2c9e58088e40ae453824c
      https://github.com/okfn/ckan/commit/6a5893bc7cc2935310b2c9e58088e40ae453824c
  Author: amercader <amercadero at gmail.com>
  Date:   2013-11-05 (Tue, 05 Nov 2013)

  Changed paths:
    M ckan/public/base/javascript/client.js
    M ckan/public/base/javascript/main.js

  Log Message:
  -----------
  Default API_URL to SITE_URL if missing

Otherwise file uploads and other calls where broken when using CKAN in
a non-root location.


Compare: https://github.com/okfn/ckan/compare/ddc7872fd410...6a5893bc7cc2


More information about the ckan-changes mailing list