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

GitHub noreply at github.com
Wed Aug 7 19:09:52 UTC 2013


  Branch: refs/heads/1162-delete-users
  Home:   https://github.com/okfn/ckan
  Commit: ae9b9d8ccd9ee97b6b5a52507c1bac80e4028962
      https://github.com/okfn/ckan/commit/ae9b9d8ccd9ee97b6b5a52507c1bac80e4028962
  Author: Vitor Baptista <vitor at vitorbaptista.com>
  Date:   2013-08-07 (Wed, 07 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.





More information about the ckan-changes mailing list