[ckan-changes] [okfn/ckan] fd37c9: [#1664] Make group activity streams smarter

GitHub noreply at github.com
Tue Nov 6 20:12:09 UTC 2012


  Branch: refs/heads/DO_NOT_MERGE_3010-serve-unminified-files-in-production-hack
  Home:   https://github.com/okfn/ckan
  Commit: fd37c90e614c75f1d874f38e2733586e4ca93214
      https://github.com/okfn/ckan/commit/fd37c90e614c75f1d874f38e2733586e4ca93214
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-26 (Fri, 26 Oct 2012)

  Changed paths:
    M ckan/logic/action/get.py
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  [#1664] Make group activity streams smarter

Make group_activity_list() return all activities where the object of the
activity is either the group or any of the group's datasets, instead of just
the group as before.

Also check that the user has 'group_show' access to the group before returning
the activity stream, this plugs an access leak where a user who did not have
'group_show' access could still get the group's activity stream.

Update some existing tests that were broken by the new permission check.

Tests for the new group activity stream content need to be added.


  Commit: 9cc0f849b32301be98669d5b725ebc48b305b7f1
      https://github.com/okfn/ckan/commit/9cc0f849b32301be98669d5b725ebc48b305b7f1
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-26 (Fri, 26 Oct 2012)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/group.py
    A ckan/templates/group/activity_stream.html

  Log Message:
  -----------
  [#1664] Add group activity stream page

You can now see a group's activity stream at /group/activity/GROUP_NAME.

This page is not integrated into the rest of the group pages yet like
the user activity stream page is with the user pages, but can be in
future if we want.

Also remove c.group_activity_stream from the group read context as it's
not used so no need to compute it.


  Commit: 8facd097f6f98cff9f0a448d19e5e29fc747a173
      https://github.com/okfn/ckan/commit/8facd097f6f98cff9f0a448d19e5e29fc747a173
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-26 (Fri, 26 Oct 2012)

  Changed paths:
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  Remove direct logic function access from test_activity.py

Make functional/api/test_activity.py post to the API whenever it wants
to create, update or delete users, packages, groups, etc.

Also gets rid of the need to access resource_list_dictize() directly.


  Commit: c4240fbd72a8c953487ed46f951866c90fbbae7b
      https://github.com/okfn/ckan/commit/c4240fbd72a8c953487ed46f951866c90fbbae7b
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-26 (Fri, 26 Oct 2012)

  Changed paths:
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  Remove direct model access from test_activity.py

Import ckan.model only where needed and don't retain model objects, in
many cases replace accessing the model with going through the API


  Commit: 7ebf0c1e4ecc48661e39e13c18dc8125f39f016e
      https://github.com/okfn/ckan/commit/7ebf0c1e4ecc48661e39e13c18dc8125f39f016e
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-26 (Fri, 26 Oct 2012)

  Changed paths:
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  Fix an import in test_activity.py

Follow the CKAN Coding Standards for imports


  Commit: e5039423d1ba9e34dddb9387efc645c2be9cd892
      https://github.com/okfn/ckan/commit/e5039423d1ba9e34dddb9387efc645c2be9cd892
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-26 (Fri, 26 Oct 2012)

  Changed paths:
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  test_activity.py PEP8 fixes


  Commit: 306d9c37d582f7b2d1e0101bb259d7971837d2db
      https://github.com/okfn/ckan/commit/306d9c37d582f7b2d1e0101bb259d7971837d2db
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-26 (Fri, 26 Oct 2012)

  Changed paths:
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  Remove some commented-out tests


  Commit: 952ec8efbfb9da6cab6efdb9f43661b5776d9a42
      https://github.com/okfn/ckan/commit/952ec8efbfb9da6cab6efdb9f43661b5776d9a42
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-29 (Mon, 29 Oct 2012)

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

  Log Message:
  -----------
  [#1664] Convert group names to ids in group_activity_list()

This fixes a bug where calling group_activity_list with the group's name
as the id parameter would return less results than if you called it with
the group's id.


  Commit: 5d926d91d00075ff144c56c3bb8af3308803f64d
      https://github.com/okfn/ckan/commit/5d926d91d00075ff144c56c3bb8af3308803f64d
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-29 (Mon, 29 Oct 2012)

  Changed paths:
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  [#1664] Add some tests for group activity streams

Add some tests for the new smarter group activity streams. There were
already tests that changes to the group itself (created, updated or
deleted group) appear in the group's activity stream, now add some tests
that changes to the group's packages appear in the group's activity
stream.

These tests are not ideal, test_activity.py needs refactoring it's too
complicated.


  Commit: 22b5ff34dbb0a0456bba5988b6e9aacba627d5e2
      https://github.com/okfn/ckan/commit/22b5ff34dbb0a0456bba5988b6e9aacba627d5e2
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-29 (Mon, 29 Oct 2012)

  Changed paths:
    M ckan/logic/action/get.py
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  Add auth checks to activity streams API functions


  Commit: 1c64b4cf756fc879272b0ec8b8b30f45721beaf2
      https://github.com/okfn/ckan/commit/1c64b4cf756fc879272b0ec8b8b30f45721beaf2
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-10-29 (Mon, 29 Oct 2012)

  Changed paths:
    R doc/howto-editing-database-ownership.rst
    M doc/paster.rst

  Log Message:
  -----------
  Merge branch 'master' of github.com:okfn/ckan into feature-1664-smarter-group-activity-streams


  Commit: 9ebc00217997acb6505a4e18e62bd45a3a595407
      https://github.com/okfn/ckan/commit/9ebc00217997acb6505a4e18e62bd45a3a595407
  Author: Ian Murray <ian.c.murray at gmail.com>
  Date:   2012-11-02 (Fri, 02 Nov 2012)

  Changed paths:
    M ckan/controllers/group.py

  Log Message:
  -----------
  [#1664] Use field name in internationalized error.


  Commit: 97eb5f89e0db128dae729ead7d94a357386ca1f6
      https://github.com/okfn/ckan/commit/97eb5f89e0db128dae729ead7d94a357386ca1f6
  Author: Ian Murray <ian.c.murray at gmail.com>
  Date:   2012-11-02 (Fri, 02 Nov 2012)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/group.py
    M ckan/logic/action/get.py
    A ckan/templates/group/activity_stream.html
    M ckan/tests/functional/api/test_activity.py

  Log Message:
  -----------
  Merge branch 'feature-1664-smarter-group-activity-streams'


  Commit: c59b304cb6b8a6dce09b8e9f708f9cb4d684cab4
      https://github.com/okfn/ckan/commit/c59b304cb6b8a6dce09b8e9f708f9cb4d684cab4
  Author: Rufus Pollock <rufus.pollock at okfn.org>
  Date:   2012-11-03 (Sat, 03 Nov 2012)

  Changed paths:
    M doc/_themes/sphinx-theme-okfn

  Log Message:
  -----------
  [doc/theme][xs]: update to latest version of the doc theme.


  Commit: e66c0f70c14de16fe1a04d6ee7db0cda5a963d5e
      https://github.com/okfn/ckan/commit/e66c0f70c14de16fe1a04d6ee7db0cda5a963d5e
  Author: Sean Hammond <seanhammond at lavabit.com>
  Date:   2012-11-06 (Tue, 06 Nov 2012)

  Changed paths:
    M ckan/config/routing.py
    M ckan/controllers/group.py
    M ckan/logic/action/get.py
    A ckan/templates/group/activity_stream.html
    M ckan/tests/functional/api/test_activity.py
    M doc/_themes/sphinx-theme-okfn

  Log Message:
  -----------
  Merge branch 'master' of github.com:okfn/ckan into DO_NOT_MERGE_3010-serve-unminified-files-in-production-hack


Compare: https://github.com/okfn/ckan/compare/0e2d216c7f34...e66c0f70c14d


More information about the ckan-changes mailing list