[ckan-changes] [okfn/ckan] 7c60ba: [#1163] Users can be deleted

GitHub noreply at github.com
Wed Oct 16 08:14:16 UTC 2013


  Branch: refs/heads/master
  Home:   https://github.com/okfn/ckan
  Commit: 7c60ba441dcbdb309e82344a6a981b87243a20a3
      https://github.com/okfn/ckan/commit/7c60ba441dcbdb309e82344a6a981b87243a20a3
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/user.py
    M ckan/lib/authenticator.py
    M ckan/lib/base.py
    M ckan/lib/create_test_data.py
    M ckan/logic/action/delete.py
    M ckan/logic/action/get.py
    M ckan/logic/auth/delete.py
    A ckan/migration/versions/070_add_state_column_to_user_table.py
    M ckan/model/follower.py
    M ckan/model/user.py
    M ckan/new_authz.py
    M ckan/templates/user/edit_user_form.html
    M ckan/templates/user/read_base.html
    M ckan/tests/functional/test_user.py
    A ckan/tests/lib/test_authenticator.py
    M ckan/tests/lib/test_dictization.py
    M ckan/tests/logic/test_action.py
    M ckan/tests/logic/test_auth.py
    A ckan/tests/models/test_follower.py
    M ckan/tests/models/test_user.py

  Log Message:
  -----------
  [#1163] Users can be deleted

To do this, I've configured the User model to be stateful using vdm.sqlalchemy.
Right now, there're two states: active and deleted. If a user is deleted, he
can't login, and is unauthorized to do anything. She also doesn't appear in the
user's list anymore, but you can still access her profile page, if you know her
username.

If she was logged in when her user was deleted, the next time she goes into
CKAN, she'll be logged off. Unfortunately, there's not a useful message like
"Your user has been deleted." Yet.

There's no way to undelete a user, but it should be simply creating an
action to set her state to active.


  Commit: ad2de00a4e2c2772d1e59faee26ca818731168c9
      https://github.com/okfn/ckan/commit/ad2de00a4e2c2772d1e59faee26ca818731168c9
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/logic/action/get.py
    M ckan/migration/versions/070_add_state_column_to_user_table.py
    M ckan/model/follower.py
    M ckan/model/group.py
    M ckan/model/user.py

  Log Message:
  -----------
  [#1163] Use ckan.model.State instead of vdm.sqlalchemy.State

This makes us a bit less tied to vdm.


  Commit: d6fde48e5cd73a2d0754b3ceb9fe6319deedaa20
      https://github.com/okfn/ckan/commit/d6fde48e5cd73a2d0754b3ceb9fe6319deedaa20
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/logic/action/get.py
    M ckan/migration/versions/070_add_state_column_to_user_table.py
    M ckan/model/follower.py
    M ckan/model/group.py
    M ckan/model/user.py

  Log Message:
  -----------
  [#1163] Use ckan.model.core.State instead of ckan.model.State

With this change, we're able to avoid having to load ckan.model inside methods,
to avoid circular dependencies.


  Commit: 89a38101afe7b1415d431cdffc013e45bf90bf67
      https://github.com/okfn/ckan/commit/89a38101afe7b1415d431cdffc013e45bf90bf67
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/lib/authenticator.py
    M ckan/lib/base.py
    M ckan/model/user.py
    M ckan/new_authz.py
    M ckan/tests/lib/test_authenticator.py
    M ckan/tests/logic/test_auth.py
    M ckan/tests/models/test_user.py

  Log Message:
  -----------
  [#1178] Add PENDING state to User


  Commit: c0c6803b574d48016af6185fd0a2a71605567a77
      https://github.com/okfn/ckan/commit/c0c6803b574d48016af6185fd0a2a71605567a77
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/controllers/user.py
    M ckan/tests/functional/test_user.py

  Log Message:
  -----------
  [#1178] The user is activated when it performs the reset password


  Commit: 74f649c9e3eb0690f5e48f939b4546b415b0777b
      https://github.com/okfn/ckan/commit/74f649c9e3eb0690f5e48f939b4546b415b0777b
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/controllers/user.py
    M ckan/logic/action/create.py
    M ckan/logic/auth/create.py
    M ckan/logic/schema.py
    M ckan/new_authz.py
    M ckan/tests/functional/test_user.py
    M ckan/tests/logic/test_action.py
    M ckan/tests/logic/test_auth.py
    M dev-requirements.txt

  Log Message:
  -----------
  [#1178] Admins can invite users

The invited user starts in pending state, with the password reset key set. We
still have to send an email to the user telling him/her to change the password
and log in.

I had to change authorization code to only automatically unauthorize deleted
users, not pending. This was because the users needs to be able to perform the
password reset when pending, to be able to become active.


  Commit: 31523cd27a35958c2f0660a2762bcfd0274c8006
      https://github.com/okfn/ckan/commit/31523cd27a35958c2f0660a2762bcfd0274c8006
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/controllers/user.py

  Log Message:
  -----------
  [#1178] perform_reset uses the received id as the context's user

When performing a password reset, the user is probably (always?) not logged in.
So c.user is an empty string. So, the auth functions have no way to tell which
user is trying to reset his/her password.

This worked fine before, because everyone was able to reset the password. But
now that we've got users in DELETED state, it's not the case anymore.


  Commit: e5890740164c38ca0ebf10bf25a297b0b634e204
      https://github.com/okfn/ckan/commit/e5890740164c38ca0ebf10bf25a297b0b634e204
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-16 (Fri, 16 Aug 2013)

  Changed paths:
    M ckan/lib/mailer.py
    M ckan/logic/action/create.py
    M ckan/tests/lib/test_mailer.py
    M ckan/tests/logic/test_action.py

  Log Message:
  -----------
  [#1178] Send email to the invited user

I removed the time.sleep(0.1) on TestMailer. Looking through the code, I
couldn't find anywhere where a timer looked needed. And I ran these tests a
hundred times without the timer to see if I could make them fail, but no. So, I
guess they're not needed anymore.

I also had to move the RESET_LINK_MESSAGE inside get_reset_link_body(). This
was because, when importing ckan.lib.mailer in ckan.logic.action.create.py, I
got:

    TypeError: No object (name: translator) has been registered for this thread

This seems to be because we were using _() before pylons had a change to set up
the translator. Moving it inside the method solves this.


  Commit: f2f9095926e143ef7a1fe46f613c88bbf1096478
      https://github.com/okfn/ckan/commit/f2f9095926e143ef7a1fe46f613c88bbf1096478
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-20 (Tue, 20 Aug 2013)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/logic/auth/create.py
    M ckan/model/user.py
    M ckan/tests/lib/test_mailer.py
    M ckan/tests/logic/test_action.py
    M ckan/tests/logic/test_auth.py

  Log Message:
  -----------
  [#1178] Adds user to organization when inviting, and only org admins can invite


  Commit: b75524ee9b74166428555c6c5f76db7f58c67f14
      https://github.com/okfn/ckan/commit/b75524ee9b74166428555c6c5f76db7f58c67f14
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-29 (Thu, 29 Aug 2013)

  Changed paths:
    M ckan/controllers/group.py
    M ckan/logic/action/create.py
    M ckan/logic/auth/create.py
    M ckan/model/user.py
    M ckan/templates/group/member_new.html
    M ckan/templates/organization/member_new.html
    M ckan/tests/functional/test_group.py
    M ckan/tests/logic/test_action.py
    M ckan/tests/logic/test_auth.py

  Log Message:
  -----------
  [#1178] Invite user on add member to organization/group

I've added an "Email" field to the "Add Member" to Organization/Group page. If
you add an e-mail there, we'll create a new user and invite her (doesn't matter
if there's already a user with the same email).

I still need to change the template and add help texts.


  Commit: 1503ffa654d2d09dfe7de9333622c9e1edd9564a
      https://github.com/okfn/ckan/commit/1503ffa654d2d09dfe7de9333622c9e1edd9564a
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-31 (Sat, 31 Aug 2013)

  Changed paths:
    M .tx/config
    M CHANGELOG.rst
    M ckan/config/deployment.ini_tmpl
    M ckan/config/middleware.py
    M ckan/config/solr/schema-2.0.xml
    A ckan/i18n/ar/LC_MESSAGES/ckan.mo
    A ckan/i18n/ar/LC_MESSAGES/ckan.po
    M ckan/i18n/bg/LC_MESSAGES/ckan.mo
    M ckan/i18n/bg/LC_MESSAGES/ckan.po
    M ckan/i18n/ca/LC_MESSAGES/ckan.mo
    M ckan/i18n/ca/LC_MESSAGES/ckan.po
    M ckan/i18n/ckan.pot
    M ckan/i18n/cs_CZ/LC_MESSAGES/ckan.mo
    M ckan/i18n/cs_CZ/LC_MESSAGES/ckan.po
    A ckan/i18n/da_DK/LC_MESSAGES/ckan.mo
    A ckan/i18n/da_DK/LC_MESSAGES/ckan.po
    M ckan/i18n/de/LC_MESSAGES/ckan.mo
    M ckan/i18n/de/LC_MESSAGES/ckan.po
    M ckan/i18n/dv/LC_MESSAGES/ckan.mo
    M ckan/i18n/dv/LC_MESSAGES/ckan.po
    M ckan/i18n/el/LC_MESSAGES/ckan.mo
    M ckan/i18n/el/LC_MESSAGES/ckan.po
    A ckan/i18n/en_AU/LC_MESSAGES/ckan.mo
    A ckan/i18n/en_AU/LC_MESSAGES/ckan.po
    M ckan/i18n/en_GB/LC_MESSAGES/ckan.mo
    M ckan/i18n/en_GB/LC_MESSAGES/ckan.po
    M ckan/i18n/es/LC_MESSAGES/ckan.mo
    M ckan/i18n/es/LC_MESSAGES/ckan.po
    M ckan/i18n/es_AR/LC_MESSAGES/ckan.mo
    M ckan/i18n/es_AR/LC_MESSAGES/ckan.po
    M ckan/i18n/fa_IR/LC_MESSAGES/ckan.mo
    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.mo
    M ckan/i18n/fr/LC_MESSAGES/ckan.po
    M ckan/i18n/hu/LC_MESSAGES/ckan.mo
    M ckan/i18n/hu/LC_MESSAGES/ckan.po
    M ckan/i18n/id/LC_MESSAGES/ckan.mo
    M ckan/i18n/id/LC_MESSAGES/ckan.po
    M ckan/i18n/is/LC_MESSAGES/ckan.mo
    M ckan/i18n/is/LC_MESSAGES/ckan.po
    M ckan/i18n/it/LC_MESSAGES/ckan.mo
    M ckan/i18n/it/LC_MESSAGES/ckan.po
    M ckan/i18n/ja/LC_MESSAGES/ckan.mo
    M ckan/i18n/ja/LC_MESSAGES/ckan.po
    A ckan/i18n/km/LC_MESSAGES/ckan.mo
    A ckan/i18n/km/LC_MESSAGES/ckan.po
    M ckan/i18n/ko_KR/LC_MESSAGES/ckan.mo
    M ckan/i18n/ko_KR/LC_MESSAGES/ckan.po
    M ckan/i18n/lt/LC_MESSAGES/ckan.mo
    M ckan/i18n/lt/LC_MESSAGES/ckan.po
    M ckan/i18n/lv/LC_MESSAGES/ckan.mo
    M ckan/i18n/lv/LC_MESSAGES/ckan.po
    M ckan/i18n/my_MM/LC_MESSAGES/ckan.mo
    M ckan/i18n/my_MM/LC_MESSAGES/ckan.po
    M ckan/i18n/nl/LC_MESSAGES/ckan.mo
    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.mo
    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/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.mo
    M ckan/i18n/sk/LC_MESSAGES/ckan.po
    M ckan/i18n/sl/LC_MESSAGES/ckan.mo
    M ckan/i18n/sl/LC_MESSAGES/ckan.po
    M ckan/i18n/sq/LC_MESSAGES/ckan.mo
    M ckan/i18n/sq/LC_MESSAGES/ckan.po
    M ckan/i18n/sr/LC_MESSAGES/ckan.mo
    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/tr/LC_MESSAGES/ckan.mo
    M ckan/i18n/tr/LC_MESSAGES/ckan.po
    M ckan/i18n/uk_UA/LC_MESSAGES/ckan.mo
    M ckan/i18n/uk_UA/LC_MESSAGES/ckan.po
    M ckan/i18n/zh_CN/LC_MESSAGES/ckan.mo
    M ckan/i18n/zh_CN/LC_MESSAGES/ckan.po
    M ckan/i18n/zh_TW/LC_MESSAGES/ckan.mo
    M ckan/i18n/zh_TW/LC_MESSAGES/ckan.po
    M ckan/lib/dictization/model_dictize.py
    M ckan/lib/formatters.py
    M ckan/lib/helpers.py
    M ckan/lib/navl/dictization_functions.py
    M ckan/lib/search/__init__.py
    M ckan/lib/search/index.py
    M ckan/lib/search/query.py
    M ckan/logic/action/create.py
    M ckan/logic/action/get.py
    M ckan/logic/auth/create.py
    M ckan/logic/auth/update.py
    A ckan/migration/versions/070_add_activity_and_resource_indexes.py
    M ckan/model/activity.py
    M ckan/new_authz.py
    M ckan/plugins/core.py
    M ckan/plugins/interfaces.py
    M ckan/templates/group/snippets/group_form.html
    M ckan/templates/organization/snippets/organization_form.html
    M ckan/templates/snippets/activity_item.html
    M ckan/tests/functional/test_package.py
    M ckan/tests/logic/test_action.py
    A ckan/tests/models/test_activity.py
    M ckan/tests/test_plugins.py
    M ckanext/datastore/logic/action.py
    M ckanext/datastore/logic/auth.py
    M ckanext/datastore/logic/schema.py
    M ckanext/datastore/plugin.py
    M ckanext/datastore/tests/test_create.py
    M ckanext/multilingual/solr/schema.xml
    M ckanext/reclinepreview/theme/public/resource.config
    M ckanext/resourceproxy/controller.py
    M ckanext/resourceproxy/tests/test_proxy.py
    M dev-requirements.txt
    M doc/conf.py
    M doc/configuration.rst
    M doc/data-viewer.rst
    M doc/datastore.rst
    M doc/documentation-guidelines.rst
    M doc/install-from-source.rst
    M doc/python-coding-standards.rst
    M doc/test.rst
    M doc/upgrade-source.rst
    A pip-requirements-docs.txt

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/master' into 1178-users-invitations


  Commit: 89db2ed23ca5cb0136a44d2829f2e713f2b2558d
      https://github.com/okfn/ckan/commit/89db2ed23ca5cb0136a44d2829f2e713f2b2558d
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-31 (Sat, 31 Aug 2013)

  Changed paths:
    R ckan/migration/versions/070_add_state_column_to_user_table.py
    A ckan/migration/versions/071_add_state_column_to_user_table.py

  Log Message:
  -----------
  [#1178] Move migration from 070 to 071, as we have a new 070


  Commit: 40397fe5c9bd0e2703f0d4e26227863c6cbc6b4a
      https://github.com/okfn/ckan/commit/40397fe5c9bd0e2703f0d4e26227863c6cbc6b4a
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-09-09 (Mon, 09 Sep 2013)

  Changed paths:
    M ckan/public/base/less/forms.less
    M ckan/templates/group/member_new.html
    M ckan/templates/organization/member_new.html

  Log Message:
  -----------
  [#1178] Add help text to the add member forms


  Commit: 08c45188a91f64d121f0d7ed753e461de7df277d
      https://github.com/okfn/ckan/commit/08c45188a91f64d121f0d7ed753e461de7df277d
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-09-09 (Mon, 09 Sep 2013)

  Changed paths:
    M ckan/config/deployment.ini_tmpl
    M doc/configuration.rst

  Log Message:
  -----------
  Merge branch 'master' into 1178-users-invitations


  Commit: 0f710ac9888b83977641d082eddf59be97023592
      https://github.com/okfn/ckan/commit/0f710ac9888b83977641d082eddf59be97023592
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-09-09 (Mon, 09 Sep 2013)

  Changed paths:
    M CONTRIBUTING.rst
    M ckan/lib/base.py
    M ckan/lib/cli.py
    M ckan/lib/helpers.py
    M ckan/lib/navl/dictization_functions.py
    M ckan/lib/plugins.py
    M ckan/logic/__init__.py
    M ckan/logic/action/get.py
    M ckan/pastertemplates/template/setup.py_tmpl
    M ckan/plugins/interfaces.py
    M ckan/plugins/toolkit.py
    A ckan/plugins/toolkit_sphinx_extension.py
    A ckanext/example_iauthfunctions/__init__.py
    A ckanext/example_iauthfunctions/plugin.py
    A ckanext/example_iauthfunctions/plugin_v1.py
    A ckanext/example_iauthfunctions/plugin_v2.py
    A ckanext/example_iauthfunctions/plugin_v3.py
    A ckanext/example_iauthfunctions/tests/test_example_iauthfunctions.py
    M doc/api.rst
    M doc/authorization.rst
    M doc/background-tasks.rst
    M doc/ckan-coding-standards.rst
    M doc/conf.py
    M doc/configuration.rst
    M doc/data-viewer.rst
    M doc/documentation-guidelines.rst
    A doc/extensions/best-practices.rst
    A doc/extensions/converters.rst
    A doc/extensions/index.rst
    A doc/extensions/plugin-interfaces.rst
    A doc/extensions/plugins-toolkit.rst
    A doc/extensions/testing-extensions.rst
    A doc/extensions/tutorial.rst
    A doc/extensions/validators.rst
    M doc/index.rst
    M doc/tag-vocabularies.rst
    R doc/toolkit.rst
    R doc/writing-extensions.rst
    M setup.py

  Log Message:
  -----------
  Merge branch 'master' into 1178-users-invitations


  Commit: 2adda64767ea178e558ccd6844b84efe267a6dcf
      https://github.com/okfn/ckan/commit/2adda64767ea178e558ccd6844b84efe267a6dcf
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-09-09 (Mon, 09 Sep 2013)

  Changed paths:
    M ckan/migration/versions/071_add_state_column_to_user_table.py

  Log Message:
  -----------
  [#1178] Fix typo exeecute -> execute in migration


  Commit: 2d76140db869595b83d2d501380bbe9f248192f5
      https://github.com/okfn/ckan/commit/2d76140db869595b83d2d501380bbe9f248192f5
  Author: John Martin <me at johnmart.in>
  Date:   2013-09-11 (Wed, 11 Sep 2013)

  Changed paths:
    M ckan/public/base/less/forms.less
    M ckan/templates/organization/member_new.html

  Log Message:
  -----------
  [#1178] Small CSS tweaks and fix for premature closing div


  Commit: c339162836695677f02e9090f2ce40f6a65ad194
      https://github.com/okfn/ckan/commit/c339162836695677f02e9090f2ce40f6a65ad194
  Author: John Glover <j at johnglover.net>
  Date:   2013-10-02 (Wed, 02 Oct 2013)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/logic/action/delete.py
    M ckan/logic/auth/delete.py
    M ckan/model/follower.py

  Log Message:
  -----------
  [#1178] PEP8 (and correct a comment)


  Commit: 16924d937af4207a585fd34eaf2be083bcc2d6d2
      https://github.com/okfn/ckan/commit/16924d937af4207a585fd34eaf2be083bcc2d6d2
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-10-11 (Fri, 11 Oct 2013)

  Changed paths:
    M ckan/migration/versions/071_add_state_column_to_user_table.py

  Log Message:
  -----------
  [#1178] Remove backward migrations, as we don't support it


  Commit: 0bd163e75eacc65fee0546fa356f195f1e109713
      https://github.com/okfn/ckan/commit/0bd163e75eacc65fee0546fa356f195f1e109713
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-10-11 (Fri, 11 Oct 2013)

  Changed paths:
    M ckan/tests/lib/test_authenticator.py

  Log Message:
  -----------
  [#1178] Fix repeated test name


  Commit: d073ce7f6b56361cf8c5452c2f969e4d45356437
      https://github.com/okfn/ckan/commit/d073ce7f6b56361cf8c5452c2f969e4d45356437
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-10-11 (Fri, 11 Oct 2013)

  Changed paths:
    M ckan/logic/action/create.py

  Log Message:
  -----------
  [#1178] Use the data returned by validate, instead of the one passed as param


  Commit: 1da817c40b59d7dfa866abd9e68ed844442f34d4
      https://github.com/okfn/ckan/commit/1da817c40b59d7dfa866abd9e68ed844442f34d4
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-10-11 (Fri, 11 Oct 2013)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/logic/schema.py

  Log Message:
  -----------
  [#1178] Move user_invite_schema to ckan.logic.schema


  Commit: c2e4f767eed6485383a7ef2efd40a8e990d0a623
      https://github.com/okfn/ckan/commit/c2e4f767eed6485383a7ef2efd40a8e990d0a623
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-10-11 (Fri, 11 Oct 2013)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/tests/logic/test_action.py

  Log Message:
  -----------
  [#1178] Refactor user name creation

I've isolated the loop where it needs to be. This makes the code clearer, but
makes it susceptible to errors. For example, after the random name was
generated but before the user is created, another user with the same name might
be created, breaking our code.

This should be rare enough to bother us.


  Commit: dfd8ae9fb07ff551707bdc08c6e23bd424c7335c
      https://github.com/okfn/ckan/commit/dfd8ae9fb07ff551707bdc08c6e23bd424c7335c
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-10-11 (Fri, 11 Oct 2013)

  Changed paths:
    M ckan/controllers/group.py

  Log Message:
  -----------
  [#1178] Simplify "if" expression, removing redundancy


  Commit: bae4d47c3227bd5f7581ac5859edcb9badd027c0
      https://github.com/okfn/ckan/commit/bae4d47c3227bd5f7581ac5859edcb9badd027c0
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-10-12 (Sat, 12 Oct 2013)

  Changed paths:
    M ckan/logic/action/get.py
    M ckan/migration/versions/071_add_state_column_to_user_table.py

  Log Message:
  -----------
  [#1178] Use model.State instead of core.State


  Commit: 31d64f3a1145894033da3061a826cbe42337d64c
      https://github.com/okfn/ckan/commit/31d64f3a1145894033da3061a826cbe42337d64c
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-10-12 (Sat, 12 Oct 2013)

  Changed paths:
    M CHANGELOG.rst
    M CONTRIBUTING.rst
    M ckan/ckan_nose_plugin.py
    M ckan/controllers/admin.py
    M ckan/controllers/api.py
    M ckan/controllers/feed.py
    M ckan/controllers/home.py
    M ckan/controllers/package.py
    M ckan/controllers/related.py
    M ckan/controllers/revision.py
    M ckan/controllers/storage.py
    M ckan/controllers/tag.py
    M ckan/lib/app_globals.py
    M ckan/lib/cli.py
    M ckan/lib/dictization/model_dictize.py
    M ckan/lib/helpers.py
    M ckan/lib/navl/validators.py
    M ckan/logic/__init__.py
    M ckan/logic/action/delete.py
    M ckan/logic/action/get.py
    M ckan/logic/action/update.py
    M ckan/logic/auth/create.py
    M ckan/logic/auth/update.py
    M ckan/logic/validators.py
    M ckan/model/package.py
    M ckan/model/resource.py
    M ckan/new_authz.py
    A ckan/new_tests/__init__.py
    A ckan/new_tests/controllers/__init__.py
    A ckan/new_tests/factories.py
    A ckan/new_tests/helpers.py
    A ckan/new_tests/lib/__init__.py
    A ckan/new_tests/lib/navl/test_validators.py
    A ckan/new_tests/logic/__init__.py
    A ckan/new_tests/logic/action/__init__.py
    A ckan/new_tests/logic/action/test_update.py
    A ckan/new_tests/logic/auth/__init__.py
    A ckan/new_tests/logic/auth/test_update.py
    A ckan/new_tests/logic/test_schema.py
    A ckan/new_tests/logic/test_validators.py
    A ckan/new_tests/migration/__init__.py
    A ckan/new_tests/model/__init__.py
    A ckan/new_tests/plugins/__init__.py
    M ckan/plugins/interfaces.py
    M ckan/plugins/toolkit.py
    M ckan/public/base/css/fuchsia.css
    M ckan/public/base/css/green.css
    M ckan/public/base/css/main.css
    M ckan/public/base/css/maroon.css
    M ckan/public/base/css/red.css
    M ckan/public/base/less/homepage.less
    M ckan/public/base/vendor/select2/README.md
    A ckan/public/base/vendor/select2/select2-spinner.gif
    M ckan/public/base/vendor/select2/select2.css
    M ckan/public/base/vendor/select2/select2.js
    R ckan/public/base/vendor/select2/select2.min.css
    M ckan/public/base/vendor/select2/select2.min.js
    M ckan/public/base/vendor/select2/select2.png
    A ckan/public/base/vendor/select2/select2x2.png
    R ckan/public/base/vendor/select2/spinner.gif
    M ckan/templates/activity_streams/activity_stream_items.html
    M ckan/templates/admin/base.html
    M ckan/templates/admin/config.html
    M ckan/templates/dataviewer/base.html
    M ckan/templates/dataviewer/snippets/data_preview.html
    M ckan/templates/footer.html
    M ckan/templates/group/admins.html
    M ckan/templates/group/base_form_page.html
    M ckan/templates/group/confirm_delete.html
    M ckan/templates/group/confirm_delete_member.html
    M ckan/templates/group/followers.html
    M ckan/templates/group/history.html
    M ckan/templates/group/index.html
    M ckan/templates/group/member_new.html
    M ckan/templates/group/new.html
    M ckan/templates/group/read.html
    M ckan/templates/header.html
    M ckan/templates/home/index.html
    A ckan/templates/home/layout1.html
    A ckan/templates/home/layout2.html
    A ckan/templates/home/layout3.html
    A ckan/templates/home/snippets/featured_group.html
    A ckan/templates/home/snippets/featured_organization.html
    A ckan/templates/home/snippets/promoted.html
    A ckan/templates/home/snippets/search.html
    A ckan/templates/home/snippets/stats.html
    M ckan/templates/macros/autoform.html
    M ckan/templates/organization/about.html
    M ckan/templates/organization/activity_stream.html
    M ckan/templates/organization/admins.html
    M ckan/templates/organization/base_form_page.html
    M ckan/templates/organization/bulk_process.html
    M ckan/templates/organization/confirm_delete.html
    M ckan/templates/organization/confirm_delete_member.html
    M ckan/templates/organization/index.html
    M ckan/templates/organization/members.html
    M ckan/templates/organization/read.html
    M ckan/templates/organization/read_base.html
    M ckan/templates/package/activity.html
    M ckan/templates/package/activity_stream.html
    M ckan/templates/package/base.html
    M ckan/templates/package/confirm_delete.html
    M ckan/templates/package/confirm_delete_resource.html
    M ckan/templates/package/followers.html
    M ckan/templates/package/history.html
    M ckan/templates/package/new_resource.html
    M ckan/templates/package/read.html
    M ckan/templates/package/read_base.html
    M ckan/templates/package/related_list.html
    M ckan/templates/package/search.html
    M ckan/templates/package/snippets/additional_info.html
    M ckan/templates/package/snippets/info.html
    M ckan/templates/package/snippets/package_basic_fields.html
    M ckan/templates/package/snippets/package_metadata_fields.html
    M ckan/templates/package/snippets/resource_form.html
    M ckan/templates/package/snippets/resources_list.html
    M ckan/templates/package/snippets/revisions_table.html
    M ckan/templates/page.html
    M ckan/templates/related/base_form_page.html
    M ckan/templates/related/confirm_delete.html
    M ckan/templates/related/edit_form.html
    M ckan/templates/revision/read.html
    M ckan/templates/revision/snippets/revisions_list.html
    M ckan/templates/snippets/activity_item.html
    M ckan/templates/snippets/context/dataset.html
    M ckan/templates/snippets/context/group.html
    M ckan/templates/snippets/context/user.html
    M ckan/templates/snippets/disqus_trackback.html
    M ckan/templates/snippets/follow_button.html
    M ckan/templates/snippets/license.html
    M ckan/templates/snippets/organization.html
    M ckan/templates/snippets/private.html
    M ckan/templates/tag/index.html
    M ckan/templates/user/activity_stream.html
    M ckan/templates/user/dashboard.html
    M ckan/templates/user/edit.html
    M ckan/templates/user/followers.html
    M ckan/templates/user/list.html
    M ckan/templates/user/login.html
    M ckan/templates/user/logout_first.html
    M ckan/templates/user/read_base.html
    M ckan/templates/user/request_reset.html
    M ckan/templates/user/snippets/followee_dropdown.html
    M ckan/templates/user/snippets/followers.html
    M ckan/tests/functional/api/test_activity.py
    M ckan/tests/functional/api/test_user.py
    A ckan/tests/functional/test_tracking.py
    M ckan/tests/lib/test_dictization.py
    M ckan/tests/lib/test_dictization_schema.py
    M ckan/tests/lib/test_navl.py
    M ckan/tests/lib/test_resource_search.py
    M ckan/tests/logic/test_action.py
    M ckan/tests/logic/test_init.py
    M ckanext/datastore/logic/auth.py
    M ckanext/datastore/plugin.py
    M ckanext/example_iauthfunctions/plugin.py
    M ckanext/example_iauthfunctions/tests/test_example_iauthfunctions.py
    M ckanext/pdfpreview/theme/public/vendor/pdfjs/pdf.min.js
    A ckanext/pdfpreview/theme/public/vendor/pdfviewer/compatibility.min.js
    A ckanext/pdfpreview/theme/public/vendor/pdfviewer/viewer.min.css
    A ckanext/pdfpreview/theme/public/vendor/pdfviewer/viewer.min.js
    A ckanext/pdfpreview/theme/public/vendor/webL10n/l10n.min.js
    R ckanext/textpreview/theme/public/highlight.pack.js
    M ckanext/textpreview/theme/public/resource.config
    A ckanext/textpreview/theme/public/vendor/highlight.pack.js
    M dev-requirements.txt
    M doc/configuration.rst
    M doc/extensions/best-practices.rst
    M doc/i18n.rst
    M doc/multilingual.rst
    M doc/test.rst
    A doc/testing-coding-standards.rst
    M doc/upgrade-source.rst
    A navl/__init__.py b/ckan/new_tests/lib/navl/__init__.py
    M test-core.ini

  Log Message:
  -----------
  Merge branch 'master' into 1178-users-invitations

Conflicts:
	ckan/controllers/user.py
	ckan/templates/group/member_new.html
	ckan/tests/logic/test_action.py
	dev-requirements.txt


  Commit: 6431ba3dc6a117926101a97ae859132a906cf0f2
      https://github.com/okfn/ckan/commit/6431ba3dc6a117926101a97ae859132a906cf0f2
  Author: John Glover <j at johnglover.net>
  Date:   2013-10-15 (Tue, 15 Oct 2013)

  Changed paths:
    M ckan/controllers/user.py

  Log Message:
  -----------
  [#1178] Add auth_user_obj back to context in
User controller methods.


  Commit: 4ac411b61cfae7048cdc6cc5cace42aec20a13e9
      https://github.com/okfn/ckan/commit/4ac411b61cfae7048cdc6cc5cace42aec20a13e9
  Author: John Glover <j at johnglover.net>
  Date:   2013-10-15 (Tue, 15 Oct 2013)

  Changed paths:
    M ckan/templates/organization/member_new.html

  Log Message:
  -----------
  [#1178] Fix typo in org member_new template


  Commit: 322149c6934a574589f37ffe8317c444ad0885ff
      https://github.com/okfn/ckan/commit/322149c6934a574589f37ffe8317c444ad0885ff
  Author: John Glover <j at johnglover.net>
  Date:   2013-10-15 (Tue, 15 Oct 2013)

  Changed paths:
    M ckan/logic/action/create.py

  Log Message:
  -----------
  [#1178] Constrain number of attempts to generate
a random user name in user_invite


  Commit: a480ace5ae73532627ad9b04cc3416f855373fc6
      https://github.com/okfn/ckan/commit/a480ace5ae73532627ad9b04cc3416f855373fc6
  Author: John Glover <j at johnglover.net>
  Date:   2013-10-15 (Tue, 15 Oct 2013)

  Changed paths:
    M ckan/logic/action/create.py

  Log Message:
  -----------
  [#1178] handle edge case where _get_random_username_from_email
fails by returning the cleaned local part of the
email address. This is expected to fail
validation in user_create.


  Commit: 3d4040da6702c8eefeecf8b77c65a1c267d262c8
      https://github.com/okfn/ckan/commit/3d4040da6702c8eefeecf8b77c65a1c267d262c8
  Author: John Glover <j at johnglover.net>
  Date:   2013-10-16 (Wed, 16 Oct 2013)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/group.py
    M ckan/controllers/user.py
    M ckan/lib/authenticator.py
    M ckan/lib/base.py
    M ckan/lib/create_test_data.py
    M ckan/lib/mailer.py
    M ckan/logic/action/create.py
    M ckan/logic/action/delete.py
    M ckan/logic/action/get.py
    M ckan/logic/auth/create.py
    M ckan/logic/auth/delete.py
    M ckan/logic/schema.py
    A ckan/migration/versions/071_add_state_column_to_user_table.py
    M ckan/model/follower.py
    M ckan/model/group.py
    M ckan/model/user.py
    M ckan/new_authz.py
    M ckan/public/base/less/forms.less
    M ckan/templates/group/member_new.html
    M ckan/templates/organization/member_new.html
    M ckan/templates/user/edit_user_form.html
    M ckan/templates/user/read_base.html
    M ckan/tests/functional/test_group.py
    M ckan/tests/functional/test_user.py
    A ckan/tests/lib/test_authenticator.py
    M ckan/tests/lib/test_dictization.py
    M ckan/tests/lib/test_mailer.py
    M ckan/tests/logic/test_action.py
    M ckan/tests/logic/test_auth.py
    A ckan/tests/models/test_follower.py
    M ckan/tests/models/test_user.py

  Log Message:
  -----------
  Merge pull request #1178 from okfn/1178-users-invitations

Users invitations


Compare: https://github.com/okfn/ckan/compare/306ef40efc5a...3d4040da6702


More information about the ckan-changes mailing list