[ckan-changes] [ckan/ckan] 9b8b2a: Merge branch 'master' into remove-vdm
Adrià Mercader
noreply at github.com
Fri Oct 4 12:24:30 UTC 2019
Branch: refs/heads/remove-vdm-2
Home: https://github.com/ckan/ckan
Commit: 9b8b2a378cb592b1d2382d12869c92898d61d84a
https://github.com/ckan/ckan/commit/9b8b2a378cb592b1d2382d12869c92898d61d84a
Author: amercader <amercadero at gmail.com>
Date: 2019-09-20 (Fri, 20 Sep 2019)
Changed paths:
M .circleci/config.yml
M CHANGELOG.rst
M ckan/authz.py
M ckan/cli/cli.py
M ckan/cli/datastore.py
A ckan/cli/less.py
A ckan/cli/minify.py
A ckan/cli/notify.py
A ckan/cli/plugin_info.py
A ckan/cli/tracking.py
M ckan/common.py
M ckan/config/deployment.ini_tmpl
M ckan/config/environment.py
M ckan/config/middleware/__init__.py
M ckan/config/middleware/common_middleware.py
M ckan/config/middleware/flask_app.py
M ckan/config/middleware/pylons_app.py
M ckan/config/routing.py
M ckan/config/who.ini
M ckan/controllers/api.py
M ckan/controllers/feed.py
M ckan/controllers/group.py
M ckan/controllers/package.py
M ckan/controllers/user.py
R ckan/controllers/util.py
A ckan/i18n/am/LC_MESSAGES/ckan.mo
A ckan/i18n/am/LC_MESSAGES/ckan.po
M ckan/i18n/ar/LC_MESSAGES/ckan.po
M ckan/i18n/bg/LC_MESSAGES/ckan.po
M ckan/i18n/ca/LC_MESSAGES/ckan.po
M ckan/i18n/ckan.pot
M ckan/i18n/cs_CZ/LC_MESSAGES/ckan.po
M ckan/i18n/da_DK/LC_MESSAGES/ckan.po
M ckan/i18n/de/LC_MESSAGES/ckan.po
M ckan/i18n/el/LC_MESSAGES/ckan.po
M ckan/i18n/en_AU/LC_MESSAGES/ckan.po
M ckan/i18n/en_GB/LC_MESSAGES/ckan.po
M ckan/i18n/es/LC_MESSAGES/ckan.po
M ckan/i18n/es_AR/LC_MESSAGES/ckan.po
A ckan/i18n/eu/LC_MESSAGES/ckan.mo
A ckan/i18n/eu/LC_MESSAGES/ckan.po
M ckan/i18n/fa_IR/LC_MESSAGES/ckan.po
M ckan/i18n/fi/LC_MESSAGES/ckan.mo
M ckan/i18n/fi/LC_MESSAGES/ckan.po
M ckan/i18n/fr/LC_MESSAGES/ckan.po
M ckan/i18n/gl/LC_MESSAGES/ckan.po
M ckan/i18n/he/LC_MESSAGES/ckan.po
M ckan/i18n/hr/LC_MESSAGES/ckan.po
M ckan/i18n/hu/LC_MESSAGES/ckan.po
M ckan/i18n/id/LC_MESSAGES/ckan.po
M ckan/i18n/is/LC_MESSAGES/ckan.po
M ckan/i18n/it/LC_MESSAGES/ckan.po
M ckan/i18n/ja/LC_MESSAGES/ckan.po
M ckan/i18n/km/LC_MESSAGES/ckan.po
M ckan/i18n/ko_KR/LC_MESSAGES/ckan.po
M ckan/i18n/lt/LC_MESSAGES/ckan.po
M ckan/i18n/lv/LC_MESSAGES/ckan.po
M ckan/i18n/mk/LC_MESSAGES/ckan.po
M ckan/i18n/mn_MN/LC_MESSAGES/ckan.po
M ckan/i18n/nl/LC_MESSAGES/ckan.po
M ckan/i18n/no/LC_MESSAGES/ckan.mo
M ckan/i18n/no/LC_MESSAGES/ckan.po
M ckan/i18n/pl/LC_MESSAGES/ckan.po
M ckan/i18n/pt_BR/LC_MESSAGES/ckan.mo
M ckan/i18n/pt_BR/LC_MESSAGES/ckan.po
M ckan/i18n/pt_PT/LC_MESSAGES/ckan.po
M ckan/i18n/ro/LC_MESSAGES/ckan.mo
M ckan/i18n/ro/LC_MESSAGES/ckan.po
M ckan/i18n/ru/LC_MESSAGES/ckan.mo
M ckan/i18n/ru/LC_MESSAGES/ckan.po
M ckan/i18n/sk/LC_MESSAGES/ckan.po
M ckan/i18n/sl/LC_MESSAGES/ckan.po
M ckan/i18n/sq/LC_MESSAGES/ckan.po
M ckan/i18n/sr/LC_MESSAGES/ckan.po
M ckan/i18n/sr_Latn/LC_MESSAGES/ckan.mo
M ckan/i18n/sr_Latn/LC_MESSAGES/ckan.po
M ckan/i18n/sv/LC_MESSAGES/ckan.mo
M ckan/i18n/sv/LC_MESSAGES/ckan.po
M ckan/i18n/th/LC_MESSAGES/ckan.po
M ckan/i18n/tr/LC_MESSAGES/ckan.mo
M ckan/i18n/tr/LC_MESSAGES/ckan.po
M ckan/i18n/uk/LC_MESSAGES/ckan.po
M ckan/i18n/uk_UA/LC_MESSAGES/ckan.po
M ckan/i18n/vi/LC_MESSAGES/ckan.po
M ckan/i18n/zh_CN/LC_MESSAGES/ckan.po
M ckan/i18n/zh_TW/LC_MESSAGES/ckan.po
M ckan/lib/activity_streams_session_extension.py
M ckan/lib/app_globals.py
R ckan/lib/auth_tkt.py
M ckan/lib/captcha.py
A ckan/lib/changes.py
M ckan/lib/cli.py
M ckan/lib/datapreview.py
M ckan/lib/dictization/model_dictize.py
M ckan/lib/helpers.py
M ckan/lib/i18n.py
M ckan/lib/mailer.py
A ckan/lib/repoze_plugins/__init__.py
A ckan/lib/repoze_plugins/auth_tkt.py
A ckan/lib/repoze_plugins/friendly_form.py
M ckan/lib/search/__init__.py
M ckan/lib/search/common.py
M ckan/lib/search/index.py
M ckan/lib/search/query.py
M ckan/logic/__init__.py
M ckan/logic/action/create.py
M ckan/logic/action/get.py
M ckan/logic/action/patch.py
M ckan/logic/action/update.py
M ckan/logic/auth/get.py
M ckan/logic/validators.py
A ckan/migration/versions/091_0ffc0b277141_group_extra_group_id_index.py
A ckan/migration/versions/092_01afcadbd8c0_resource_package_id_index.py
M ckan/model/license.py
M ckan/model/meta.py
M ckan/plugins/core.py
M ckan/plugins/interfaces.py
M ckan/plugins/toolkit.py
M ckan/public/base/css/main.css
M ckan/public/base/css/webassets.yml
A ckan/public/base/javascript/modules/metadata-button.js
M ckan/public/base/javascript/webassets.yml
M ckan/public/base/less/activity.less
M ckan/public/base/vendor/select2/select2.js
M ckan/templates/group/edit_base.html
M ckan/templates/group/read_base.html
M ckan/templates/organization/edit_base.html
M ckan/templates/organization/read_base.html
M ckan/templates/package/changes.html
M ckan/templates/package/edit_base.html
M ckan/templates/package/read_base.html
M ckan/templates/package/resource_edit_base.html
M ckan/templates/package/resource_read.html
A ckan/templates/package/snippets/change_item.html
A ckan/templates/snippets/changes/author.html
A ckan/templates/snippets/changes/author_email.html
A ckan/templates/snippets/changes/delete_resource.html
A ckan/templates/snippets/changes/extension_fields.html
A ckan/templates/snippets/changes/extra_fields.html
A ckan/templates/snippets/changes/license.html
A ckan/templates/snippets/changes/maintainer.html
A ckan/templates/snippets/changes/maintainer_email.html
A ckan/templates/snippets/changes/name.html
A ckan/templates/snippets/changes/new_file.html
A ckan/templates/snippets/changes/new_resource.html
A ckan/templates/snippets/changes/no_change.html
A ckan/templates/snippets/changes/notes.html
A ckan/templates/snippets/changes/org.html
A ckan/templates/snippets/changes/private.html
A ckan/templates/snippets/changes/resource_desc.html
A ckan/templates/snippets/changes/resource_extras.html
A ckan/templates/snippets/changes/resource_format.html
A ckan/templates/snippets/changes/resource_name.html
A ckan/templates/snippets/changes/tags.html
A ckan/templates/snippets/changes/title.html
A ckan/templates/snippets/changes/url.html
A ckan/templates/snippets/changes/version.html
M ckan/templates/snippets/language_selector.html
M ckan/templates/user/dashboard.html
M ckan/templates/user/read_base.html
M ckan/tests/config/test_middleware.py
M ckan/tests/controllers/test_home.py
M ckan/tests/controllers/test_util.py
M ckan/tests/helpers.py
M ckan/tests/legacy/__init__.py
M ckan/tests/legacy/functional/api/base.py
M ckan/tests/legacy/functional/api/test_package_search.py
M ckan/tests/legacy/functional/test_preview_interface.py
M ckan/tests/legacy/test_coding_standards.py
M ckan/tests/legacy/test_plugins.py
M ckan/tests/lib/test_auth_tkt.py
A ckan/tests/lib/test_changes.py
M ckan/tests/lib/test_helpers.py
M ckan/tests/test_coding_standards.py
M ckan/tests/test_common.py
M ckan/views/__init__.py
M ckan/views/dataset.py
M ckan/views/feed.py
M ckan/views/group.py
M ckan/views/home.py
M ckan/views/user.py
A ckan/views/util.py
M ckanext/datapusher/logic/action.py
M ckanext/datapusher/tests/test.py
M ckanext/datastore/backend/postgres.py
M ckanext/datastore/commands.py
M ckanext/datastore/helpers.py
M ckanext/datastore/plugin.py
M ckanext/datastore/templates-bs2/datastore/dictionary.html
M ckanext/datastore/templates-bs2/package/resource_edit_base.html
M ckanext/datastore/templates/datastore/dictionary.html
M ckanext/datastore/templates/package/resource_edit_base.html
M ckanext/datastore/tests/helpers.py
M ckanext/datastore/tests/test_db.py
M ckanext/datastore/tests/test_dictionary.py
M ckanext/datastore/tests/test_info.py
M ckanext/datastore/tests/test_search.py
A ckanext/datastore/view.py
A ckanext/datatablesview/blueprint.py
R ckanext/datatablesview/controller.py
M ckanext/datatablesview/plugin.py
A ckanext/datatablesview/public/datatables_view.css
M ckanext/datatablesview/public/webassets.yml
M ckanext/datatablesview/templates/datatables/datatables_view.html
M ckanext/example_flask_iblueprint/plugin.py
M ckanext/example_flask_iblueprint/tests/test_routes.py
A ckanext/example_iconfigurer/blueprint.py
R ckanext/example_iconfigurer/controller.py
M ckanext/example_iconfigurer/plugin.py
M ckanext/example_iconfigurer/tests/test_example_iconfigurer.py
M ckanext/example_iconfigurer/tests/test_iconfigurer_update_config.py
M ckanext/example_idatasetform/tests/test_controllers.py
M ckanext/example_iuploader/test/test_plugin.py
M ckanext/multilingual/tests/test_multilingual_plugin.py
M ckanext/reclineview/plugin.py
M ckanext/resourceproxy/controller.py
M ckanext/resourceproxy/plugin.py
A ckanext/stats/blueprint.py
R ckanext/stats/controller.py
M ckanext/stats/plugin.py
M ckanext/stats/stats.py
M ckanext/textview/tests/test_view.py
M doc/maintaining/installing/deployment.rst
M doc/maintaining/installing/index.rst
M doc/maintaining/installing/install-from-docker-compose.rst
M doc/maintaining/installing/install-from-package.rst
M doc/maintaining/installing/install-from-source.rst
M doc/maintaining/installing/postgres.rst
M doc/maintaining/installing/solr.rst
M requirements.in
M requirements.txt
Log Message:
-----------
Merge branch 'master' into remove-vdm
Commit: 8c02842ebf60cd481ad1b0ad4f2d32b8a0c44b1b
https://github.com/ckan/ckan/commit/8c02842ebf60cd481ad1b0ad4f2d32b8a0c44b1b
Author: amercader <amercadero at gmail.com>
Date: 2019-10-04 (Fri, 04 Oct 2019)
Changed paths:
M ckan/lib/activity_streams_session_extension.py
M ckan/logic/__init__.py
Log Message:
-----------
Store current user in SQLAlchemy session so activity hook can get it
Up until now, the activity stream session extension used the revision
property of the session to get the user performing the action. With the
revisions gone we need to find an alternative. The
`session.revision.user` property was set after a revision was explicitly
created in an action, and its `author` property set (by way of [1]):
rev = model.repo.new_revision()
rev.author = user
So it makes sense to attached the user performing an action when the
actions happen. But rather than have to call it explicitly on each
action that has activities as above, this change adds a unique function
in ckan.logic.get_action that uses the value in the `context` object.
These can be provided by users but most of the time they are
prepolutated with the following defaults: model, model.Session and
c.user.
The main drawback of this is that if extensions import and call core
action functions directly activites will get registered as a Non logged
in user. This is discouraged but it was quite common before chained
actions were introduced (and is still used now). To support this
situation we should add the call to set the user in the session in all
actions that have activities, like it was done before with the
revisions.
[1] https://github.com/ckan/ckan/blob/42596a014a713f9787d4ee9167f4c51afaaefaa6/ckan/model/__init__.py#L436
Compare: https://github.com/ckan/ckan/compare/9b8b2a378cb5%5E...8c02842ebf60
More information about the ckan-changes
mailing list