Skip to content

Commit

Permalink
Revert "[#1188] Allow organization dropdown to be displayed"
Browse files Browse the repository at this point in the history
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 f366ba6.
  • Loading branch information
amercader committed Dec 12, 2013
1 parent fc20a45 commit 10a3798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/templates/package/snippets/package_basic_fields.html
Expand Up @@ -56,8 +56,8 @@
{% set dataset_has_organization = data.owner_org or data.group_id %}
{% set organizations_available = h.organizations_available('create_dataset') %}
{% set user_is_sysadmin = h.check_access('sysadmin') %}
{% set show_organizations_selector = organizations_available %}
{% set show_visibility_selector = dataset_has_organization or organizations_available %}
{% set show_organizations_selector = organizations_available and (user_is_sysadmin or dataset_is_draft) %}
{% set show_visibility_selector = dataset_has_organization or (organizations_available and (user_is_sysadmin or dataset_is_draft)) %}

{% if show_organizations_selector and show_visibility_selector %}
<div data-module="dataset-visibility">
Expand Down

0 comments on commit 10a3798

Please sign in to comment.