Skip to content

Commit

Permalink
Merge branch 'release-v2.5.6' into release-v2.5-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Aug 2, 2017
2 parents 3e99269 + 3b1c6c8 commit efe1b8d
Show file tree
Hide file tree
Showing 79 changed files with 455 additions and 161 deletions.
5 changes: 1 addition & 4 deletions .tx/config
Expand Up @@ -5,9 +5,6 @@ host = https://www.transifex.com
file_filter = ckan/i18n/<lang>/LC_MESSAGES/ckan.po
source_file = ckan/i18n/ckan.pot
source_lang = en
trans.sr@latin = ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po
type = PO

# Namings not quite the same in Transifex and babel:
# Transifex vs Babel (& CKAN)
# 'sr@Latin' vs 'sr_Latn'
trans.sr@latin = ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -7,6 +7,25 @@
Changelog
---------

v2.5.6 2017-08-02
=================

* Fix in organization / group form image URL field (#3661)
* Fix activity test to use utcnow (#3644)
* Changed required permission from 'update' to 'manage_group' (#3631)
* Catch invalid sort param exception (#3630)
* Choose direction of recreated package relationship depending on its type (#3626)
* Fix render_datetime for dates before year 1900 (#3611)
* Fix KeyError in 'package_create' (#3027)
* Allow slug preview to work with autocomplete fields (#2501)
* Fix filter results button not working for organization/group (#3620)
* Allow underscores in URL slug preview on create dataset (#3612)
* Create new resource view if resource format changed (#3515)
* Fixed incorrect escaping in `mail_to` and datapusher's log
* Autocomplete fields are more responsive - 300ms timeout instead of 1s (#3693)
* Fixed dataset count display for groups (#3711)
* Restrict access to form pages (#3684)

v2.5.5 2017-03-22
=================

Expand Down
2 changes: 1 addition & 1 deletion ckan/__init__.py
@@ -1,4 +1,4 @@
__version__ = '2.5.5'
__version__ = '2.5.6'

__description__ = 'CKAN Software'
__long_description__ = \
Expand Down
46 changes: 33 additions & 13 deletions ckan/controllers/group.py
Expand Up @@ -168,14 +168,24 @@ def index(self):
context['user_id'] = c.userobj.id
context['user_is_admin'] = c.userobj.sysadmin

data_dict_global_results = {
'all_fields': False,
'q': q,
'sort': sort_by,
'type': group_type or 'group',
}
global_results = self._action('group_list')(context,
data_dict_global_results)
try:
data_dict_global_results = {
'all_fields': False,
'q': q,
'sort': sort_by,
'type': group_type or 'group',
}
global_results = self._action('group_list')(
context, data_dict_global_results)
except ValidationError as e:
if e.error_dict and e.error_dict.get('message'):
msg = e.error_dict['message']
else:
msg = str(e)
h.flash_error(msg)
c.page = h.Page([], 0)
return render(self._index_template(group_type),
extra_vars={'group_type': group_type})

data_dict_page_results = {
'all_fields': True,
Expand Down Expand Up @@ -405,6 +415,7 @@ def bulk_process(self, id):
data_dict = {'id': id}

try:
self._check_access('bulk_update_public', context, {'org_id': id})
# Do not query for the group datasets when dictizing, as they will
# be ignored and get requested on the controller anyway
data_dict['include_datasets'] = False
Expand All @@ -413,7 +424,7 @@ def bulk_process(self, id):
except NotFound:
abort(404, _('Group not found'))
except NotAuthorized:
abort(401, _('Unauthorized to read group %s') % id)
abort(403, _('User %r not authorized to edit %s') % (c.user, id))

#use different form names so that ie7 can be detected
form_names = set(["bulk_action.public", "bulk_action.delete",
Expand Down Expand Up @@ -673,16 +684,21 @@ def members(self, id):
'user': c.user or c.author}

try:
data_dict = {'id': id}
check_access('group_edit_permissions', context, data_dict)
c.members = self._action('member_list')(
context, {'id': id, 'object_type': 'user'}
)
data_dict = {'id': id}
data_dict['include_datasets'] = False
c.group_dict = self._action('group_show')(context, data_dict)
except NotAuthorized:
abort(401, _('Unauthorized to delete group %s') % '')
except NotFound:
abort(404, _('Group not found'))
except NotAuthorized:
abort(
403,
_('User %r not authorized to edit members of %s') % (
c.user, id))

return self._render_template('group/members.html', group_type)

def member_new(self, id):
Expand All @@ -691,7 +707,11 @@ def member_new(self, id):
context = {'model': model, 'session': model.Session,
'user': c.user or c.author}

#self._check_access('group_delete', context, {'id': id})
try:
self._check_access('group_member_create', context, {'id': id})
except NotAuthorized:
abort(403, _('Unauthorized to create group %s members') % '')

try:
data_dict = {'id': id}
data_dict['include_datasets'] = False
Expand Down
16 changes: 9 additions & 7 deletions ckan/controllers/package.py
Expand Up @@ -549,6 +549,15 @@ def new(self, data=None, errors=None, error_summary=None):

def resource_edit(self, id, resource_id, data=None, errors=None,
error_summary=None):
context = {'model': model, 'session': model.Session,
'api_version': 3, 'for_edit': True,
'user': c.user, 'auth_user_obj': c.userobj}
data_dict = {'id': id}

try:
check_access('package_update', context, data_dict)
except NotAuthorized:
abort(403, _('User %r not authorized to edit %s') % (c.user, id))

if request.method == 'POST' and not data:
data = data or \
Expand All @@ -557,10 +566,6 @@ def resource_edit(self, id, resource_id, data=None, errors=None,
# we don't want to include save as it is part of the form
del data['save']

context = {'model': model, 'session': model.Session,
'api_version': 3, 'for_edit': True,
'user': c.user or c.author, 'auth_user_obj': c.userobj}

data['package_id'] = id
try:
if resource_id:
Expand All @@ -578,9 +583,6 @@ def resource_edit(self, id, resource_id, data=None, errors=None,
redirect(h.url_for(controller='package', action='resource_read',
id=id, resource_id=resource_id))

context = {'model': model, 'session': model.Session,
'api_version': 3, 'for_edit': True,
'user': c.user or c.author, 'auth_user_obj': c.userobj}
pkg_dict = get_action('package_show')(context, {'id': id})
if pkg_dict['state'].startswith('draft'):
# dataset has not yet been fully created
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/ar/LC_MESSAGES/ckan.po
Expand Up @@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:18+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"Language-Team: Arabic (http://www.transifex.com/okfn/ckan/language/ar/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/bg/LC_MESSAGES/ckan.po
Expand Up @@ -20,7 +20,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:23+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"Language-Team: Bulgarian (http://www.transifex.com/okfn/ckan/language/bg/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/ca/LC_MESSAGES/ckan.po
Expand Up @@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-12-04 10:58+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Adrià Mercader <adria.mercader@okfn.org>\n"
"Language-Team: Catalan (http://www.transifex.com/okfn/ckan/language/ca/)\n"
"MIME-Version: 1.0\n"
Expand Down
8 changes: 4 additions & 4 deletions ckan/i18n/cs_CZ/LC_MESSAGES/ckan.po
Expand Up @@ -4,16 +4,16 @@
#
# Translators:
# Adrià Mercader <adria.mercader@okfn.org>, 2013
# klimek <klimek@ksi.mff.cuni.cz>, 2011,2015
# klimek <klimek@ksi.mff.cuni.cz>, 2015
# Jakub Klímek <klimek@ksi.mff.cuni.cz>, 2011,2015
# Jakub Klímek <klimek@ksi.mff.cuni.cz>, 2015
# uep, 2011
msgid ""
msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-12-04 11:38+0000\n"
"Last-Translator: klimek <klimek@ksi.mff.cuni.cz>\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Jakub Klímek <klimek@ksi.mff.cuni.cz>\n"
"Language-Team: Czech (Czech Republic) (http://www.transifex.com/okfn/ckan/language/cs_CZ/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/da_DK/LC_MESSAGES/ckan.po
Expand Up @@ -15,7 +15,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:23+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"Language-Team: Danish (Denmark) (http://www.transifex.com/okfn/ckan/language/da_DK/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/de/LC_MESSAGES/ckan.po
Expand Up @@ -25,7 +25,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-12-10 07:53+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Florian Mayer <Florian.Mayer@dpaw.wa.gov.au>\n"
"Language-Team: German (http://www.transifex.com/okfn/ckan/language/de/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/el/LC_MESSAGES/ckan.po
Expand Up @@ -24,7 +24,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:11+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"Language-Team: Greek (http://www.transifex.com/okfn/ckan/language/el/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/en_AU/LC_MESSAGES/ckan.po
Expand Up @@ -12,7 +12,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 21:50+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Steven De Costa <steven.decosta@linkdigital.com.au>\n"
"Language-Team: English (Australia) (http://www.transifex.com/okfn/ckan/language/en_AU/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/en_GB/LC_MESSAGES/ckan.po
Expand Up @@ -14,7 +14,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2016-05-27 15:38+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Martin Burchell <martinb-tfx@aptivate.org>\n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/okfn/ckan/language/en_GB/)\n"
"MIME-Version: 1.0\n"
Expand Down
4 changes: 2 additions & 2 deletions ckan/i18n/es/LC_MESSAGES/ckan.po
Expand Up @@ -8,7 +8,7 @@
# Félix Pedrera <felix.pedrera@gmail.com>, 2012
# <internet@davidread.org>, 2011
# Isabel Ruiz, 2013
# javierdcm <javierdcm@gmail.com>, 2012
# J <javierdcm@gmail.com>, 2012
# Jesús García <>, 2012
# Jesus Redondo <jesusredondo@unex.es>, 2013
# Open Knowledge Foundation <translations@okfn.org>, 2011
Expand All @@ -18,7 +18,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-12-06 19:52+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Carlos Brys <brys@misiones.gov.ar>\n"
"Language-Team: Spanish (http://www.transifex.com/okfn/ckan/language/es/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/es_AR/LC_MESSAGES/ckan.po
Expand Up @@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-12-10 14:30+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Carlos Brys <brys@misiones.gov.ar>\n"
"Language-Team: Spanish (Argentina) (http://www.transifex.com/okfn/ckan/language/es_AR/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/fa_IR/LC_MESSAGES/ckan.po
Expand Up @@ -14,7 +14,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:20+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"Language-Team: Persian (Iran) (http://www.transifex.com/okfn/ckan/language/fa_IR/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/fi/LC_MESSAGES/ckan.po
Expand Up @@ -21,7 +21,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2016-05-26 12:31+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Zharktas <jari-pekka.voutilainen@gofore.com>\n"
"Language-Team: Finnish (http://www.transifex.com/okfn/ckan/language/fi/)\n"
"MIME-Version: 1.0\n"
Expand Down
6 changes: 3 additions & 3 deletions ckan/i18n/fr/LC_MESSAGES/ckan.po
Expand Up @@ -6,7 +6,7 @@
# Adrià Mercader <adria.mercader@okfn.org>, 2014
# Anne-Marie Luigi-Way, 2013
# arthur.lutz <arthur.lutz@gmail.com>, 2012
# Diane Mercier <diane.mercier@gmail.com>, 2015
# Diane Mercier <inactive+dianemercier@transifex.com>, 2015
# Emmanuel <emmanuel@raviart.com>, 2013
# <internet@davidread.org>, 2011
# keronos <aka.keronos@gmail.com>, 2012
Expand All @@ -20,8 +20,8 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-12-04 21:03+0000\n"
"Last-Translator: Diane Mercier <diane.mercier@gmail.com>\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Diane Mercier <inactive+dianemercier@transifex.com>\n"
"Language-Team: French (http://www.transifex.com/okfn/ckan/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/he/LC_MESSAGES/ckan.po
Expand Up @@ -14,7 +14,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:24+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"Language-Team: Hebrew (http://www.transifex.com/okfn/ckan/language/he/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/hr/LC_MESSAGES/ckan.po
Expand Up @@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-12-04 19:48+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Vladimir Mašala <vladimir.masala@gmail.com>\n"
"Language-Team: Croatian (http://www.transifex.com/okfn/ckan/language/hr/)\n"
"MIME-Version: 1.0\n"
Expand Down
4 changes: 2 additions & 2 deletions ckan/i18n/hu/LC_MESSAGES/ckan.po
Expand Up @@ -4,7 +4,7 @@
#
# Translators:
# <internet@davidread.org>, 2011
# kitzinger <kitzinger@gmail.com>, 2012
# David Kitzinger <kitzinger@gmail.com>, 2012
# Open Knowledge Foundation <translations@okfn.org>, 2011
# Sean Hammond <sean.hammond@okfn.org>, 2012
# stf <stefan.marsiske@gmail.com>, 2011
Expand All @@ -14,7 +14,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:21+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"Language-Team: Hungarian (http://www.transifex.com/okfn/ckan/language/hu/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/id/LC_MESSAGES/ckan.po
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 14:18+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: dread <david.read@hackneyworkshop.com>\n"
"Language-Team: Indonesian (http://www.transifex.com/okfn/ckan/language/id/)\n"
"MIME-Version: 1.0\n"
Expand Down
2 changes: 1 addition & 1 deletion ckan/i18n/is/LC_MESSAGES/ckan.po
Expand Up @@ -19,7 +19,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-12-28 21:17+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Tryggvi Björgvinsson <tryggvib@fsfi.is>\n"
"Language-Team: Icelandic (http://www.transifex.com/okfn/ckan/language/is/)\n"
"MIME-Version: 1.0\n"
Expand Down
4 changes: 2 additions & 2 deletions ckan/i18n/it/LC_MESSAGES/ckan.po
Expand Up @@ -10,7 +10,7 @@
# groundrace <groundrace@me.com>, 2013,2015
# <internet@davidread.org>, 2011
# lafuga2 <lafuga2@gmail.com>, 2012
# Lorenzo Ruzzene <lorenzo.ruzzene@gmail.com>, 2014
# Lorenzo Ruzzene <inactive+loruz@transifex.com>, 2014
# Luca De Santis <lucadex@gmail.com>, 2015
# M2M <matteo.merlanti@gmail.com>, 2013
# Maurizio Napolitano <maurizio.napolitano@okfn.org>, 2015
Expand All @@ -21,7 +21,7 @@ msgstr ""
"Project-Id-Version: CKAN\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-11-26 13:42+0000\n"
"PO-Revision-Date: 2015-11-26 15:06+0000\n"
"PO-Revision-Date: 2017-07-26 08:22+0000\n"
"Last-Translator: Maurizio Napolitano <maurizio.napolitano@okfn.org>\n"
"Language-Team: Italian (http://www.transifex.com/okfn/ckan/language/it/)\n"
"MIME-Version: 1.0\n"
Expand Down

0 comments on commit efe1b8d

Please sign in to comment.