Skip to content

Commit

Permalink
[#1348] Don't show Add Dataset button on org pages unless authorized
Browse files Browse the repository at this point in the history
The check_access function was passing the wrong parameter for the org id
so it always returned True.

We are removing the Add Dataset button on the Groups page on #1102
  • Loading branch information
amercader committed Nov 28, 2013
1 parent 9c34e8b commit 0f075c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/templates/organization/read.html
@@ -1,7 +1,7 @@
{% extends "organization/read_base.html" %}

{% block page_primary_action %}
{% if h.check_access('package_create', {'organization_id': c.group_dict.id}) %}
{% if h.check_access('package_create', {'owner_org': c.group_dict.id}) %}
{% link_for _('Add Dataset'), controller='package', action='new', group=c.group_dict.id, class_='btn btn-primary', icon='plus-sign-alt' %}
{% endif %}
{% endblock %}
Expand Down

0 comments on commit 0f075c6

Please sign in to comment.