From 0f075c61666468881316331847c5bbea7ca29860 Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 28 Nov 2013 15:24:43 +0000 Subject: [PATCH] [#1348] Don't show Add Dataset button on org pages unless authorized 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 --- ckan/templates/organization/read.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckan/templates/organization/read.html b/ckan/templates/organization/read.html index a702541fd66..aa3a0388a4d 100644 --- a/ckan/templates/organization/read.html +++ b/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 %}