[ckan-changes] [okfn/ckan] 6cb9a9: [#1188] Allow organization dropdown to be displaye...

GitHub noreply at github.com
Wed Jan 8 17:43:12 UTC 2014


  Branch: refs/heads/release-v2.2
  Home:   https://github.com/okfn/ckan
  Commit: 6cb9a97026602e624ae341c742d6b0caee262eee
      https://github.com/okfn/ckan/commit/6cb9a97026602e624ae341c742d6b0caee262eee
  Author: amercader <amercadero at gmail.com>
  Date:   2014-01-08 (Wed, 08 Jan 2014)

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

  Log Message:
  -----------
  [#1188] Allow organization dropdown to be displayed

The current logic was unclear. If a user belongs to at least one
organization, the dropdown will be displayed, both on the created and
edit forms. Same for the visibility one.


  Commit: 6123e22ddf6135c3196eec963aeba93c976cb775
      https://github.com/okfn/ckan/commit/6123e22ddf6135c3196eec963aeba93c976cb775
  Author: amercader <amercadero at gmail.com>
  Date:   2014-01-08 (Wed, 08 Jan 2014)

  Changed paths:
    M ckan/logic/validators.py

  Log Message:
  -----------
  [#1188] Allow empty orgs if datasets can be unowned

If the "create_unowned_dataset" is set to True and you are not a
sysadmin and select the "No organization" option on the dataset form,
you get a validation error.


  Commit: 1ebb8ebf65b73847ffb530912a300a24d1a612cc
      https://github.com/okfn/ckan/commit/1ebb8ebf65b73847ffb530912a300a24d1a612cc
  Author: amercader <amercadero at gmail.com>
  Date:   2014-01-08 (Wed, 08 Jan 2014)

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

  Log Message:
  -----------
  Revert "[#1188] Allow organization dropdown to be displayed"

There is certain logic, albeit a bit flacky, in hiding the organization
dropwdown, in that if shown, any user belonging to an organization could
take ownership of any unowned dataset in the instance. We need to
properly define the auth rules and enforce them at the validator level
as well. For the time being, showing the dropdown only to sysadmins
makes sense (and of course fixing the original bug on the visibility
field validator, which is done on the next commit)

This reverts commit f366ba684340adbb903b78bc5beb871069a6a0c2.


  Commit: f8fb2a2dea115db5ea28adf1c0f79f3322c657e8
      https://github.com/okfn/ckan/commit/f8fb2a2dea115db5ea28adf1c0f79f3322c657e8
  Author: amercader <amercadero at gmail.com>
  Date:   2014-01-08 (Wed, 08 Jan 2014)

  Changed paths:
    M ckan/logic/validators.py
    M ckan/new_tests/logic/test_validators.py

  Log Message:
  -----------
  [#1188] Fix visibility validator

To not rely on owner_org being present, when the validator gets a value
of private and there is no owner_org, we request the dataset anyway and
check if it actually has an owner_org.

Added new validation tests


  Commit: 7c061645ddafb4ad21c89a4aa49c4b7427094aa9
      https://github.com/okfn/ckan/commit/7c061645ddafb4ad21c89a4aa49c4b7427094aa9
  Author: amercader <amercadero at gmail.com>
  Date:   2014-01-08 (Wed, 08 Jan 2014)

  Changed paths:
    M ckan/logic/validators.py

  Log Message:
  -----------
  [#1188] Remove debugger call


  Commit: 8386c14389634ee5e694017516410e15a76b5037
      https://github.com/okfn/ckan/commit/8386c14389634ee5e694017516410e15a76b5037
  Author: amercader <amercadero at gmail.com>
  Date:   2014-01-08 (Wed, 08 Jan 2014)

  Changed paths:
    M ckan/new_tests/logic/test_validators.py

  Log Message:
  -----------
  [#1188] PEP8 fixes


  Commit: aec8351c82dec3ab1a053afa468f01d87e46a5ae
      https://github.com/okfn/ckan/commit/aec8351c82dec3ab1a053afa468f01d87e46a5ae
  Author: amercader <amercadero at gmail.com>
  Date:   2014-01-08 (Wed, 08 Jan 2014)

  Changed paths:
    M ckan/logic/validators.py

  Log Message:
  -----------
  [#1188] Tweak checks to support empty strings


Compare: https://github.com/okfn/ckan/compare/2879b92be5c4...aec8351c82de


More information about the ckan-changes mailing list