diff --git a/ckanext/issues/logic/schema/schema.py b/ckanext/issues/logic/schema/schema.py index 6690a85..8c6ce10 100644 --- a/ckanext/issues/logic/schema/schema.py +++ b/ckanext/issues/logic/schema/schema.py @@ -33,6 +33,7 @@ def issue_create_schema(): return { 'title': [not_missing], 'description': [ignore_missing], + 'assignee_id': [ignore_missing, user_exists], 'dataset_id': [not_missing, package_exists, as_package_id], } diff --git a/ckanext/issues/templates/issues/add.html b/ckanext/issues/templates/issues/add.html index 5eb9b8e..6cf132a 100644 --- a/ckanext/issues/templates/issues/add.html +++ b/ckanext/issues/templates/issues/add.html @@ -31,7 +31,7 @@
- +
diff --git a/ckanext/issues/templates/package/read_base.html b/ckanext/issues/templates/package/read_base.html index 339f241..848fd14 100644 --- a/ckanext/issues/templates/package/read_base.html +++ b/ckanext/issues/templates/package/read_base.html @@ -2,7 +2,7 @@ {% block content_primary_nav %} {{ super() }} - {% if h.issues_enabled(pkg) %} + {% if h.issues_enabled(pkg) and h.check_access('package_update', {'id':pkg.id }) %} {{ h.build_nav_icon('issues.dataset', _('Issues'), dataset_id=pkg.name) }} {% endif %} {% endblock %} diff --git a/ckanext/issues/views/issues.py b/ckanext/issues/views/issues.py index 1382a0d..36d75ef 100644 --- a/ckanext/issues/views/issues.py +++ b/ckanext/issues/views/issues.py @@ -100,7 +100,8 @@ def new(dataset_id, resource_id=None): # logic.parse_params(request.params)))) data_dict.update({ 'title': request.form.get('title'), - 'description': request.form.get('description') + 'description': request.form.get('description'), + 'assignee_id': dataset_dict['creator_user_id'] }) if not data_dict['title']: