[ckan-changes] [okfn/ckan] b81a5f: [#953] Add API tests for private dataset activitie...
GitHub
noreply at github.com
Tue Jun 4 15:22:52 UTC 2013
Branch: refs/heads/953-bug-creating-a-private-dataset-emits-an-activity
Home: https://github.com/okfn/ckan
Commit: b81a5fb1e26f3606e91c5b4bf2ab85c084abce1e
https://github.com/okfn/ckan/commit/b81a5fb1e26f3606e91c5b4bf2ab85c084abce1e
Author: Sean Hammond <seanhammond at lavabit.com>
Date: 2013-06-04 (Tue, 04 Jun 2013)
Changed paths:
M ckan/tests/functional/api/test_activity.py
Log Message:
-----------
[#953] Add API tests for private dataset activities
Add tests that no activities are emitted when creating, updating or
deleting private datasets via the API.
These could be more detailed, e.g. test adding, deleting and updating
groups as well, or moving the dataset between groups or between orgs, or
testing what happens when a private dataset is made public or
vice-versa.
Commit: c0fffa78fc4e4d526fe7da9d2f5c06208ac65db7
https://github.com/okfn/ckan/commit/c0fffa78fc4e4d526fe7da9d2f5c06208ac65db7
Author: Sean Hammond <seanhammond at lavabit.com>
Date: 2013-06-04 (Tue, 04 Jun 2013)
Changed paths:
M ckan/templates/package/snippets/package_basic_fields.html
M ckan/templates/package/snippets/package_metadata_fields.html
Log Message:
-----------
[#953] Move new dataset visibility to first stage
Move the visibility option (public or private) when creating a dataset
to the first stage of the dataset creation form. This fixes the issue
(#953) that an activity is emitted when creating private datasets. Since
the dataset is actually created when the first form is submitted, and
the public/private setting is not chosen until the third form, the
dataset is public at the moment when it's created and an activity is
emitted.
It seems to make a lot more sense fo the visibility option to be on the
first form next to the organization option anyway.
Fixes #953.
Commit: ee65f70292ae80f1843a37aeaaeea1f3edb105a6
https://github.com/okfn/ckan/commit/ee65f70292ae80f1843a37aeaaeea1f3edb105a6
Author: Sean Hammond <seanhammond at lavabit.com>
Date: 2013-06-04 (Tue, 04 Jun 2013)
Changed paths:
M ckan/logic/auth/get.py
Log Message:
-----------
[#953] Allow anyone to read datasets with no org
If a dataset has no owner organization, authorize anyone to read that
dataset (regardless of whether it's public or private).
Commit: 3b9ae1c938d7a628ee3086d79f5ad562a0dd9f0f
https://github.com/okfn/ckan/commit/3b9ae1c938d7a628ee3086d79f5ad562a0dd9f0f
Author: Sean Hammond <seanhammond at lavabit.com>
Date: 2013-06-04 (Tue, 04 Jun 2013)
Changed paths:
M ckan/templates/package/snippets/package_basic_fields.html
Log Message:
-----------
[#953] Fix display or Organization and Visibility dropdowns
Fix the logic for displaying the Organization and Visibility dropdowns
when creating or updating a dataset.
We really need frontend tests for this.
I tested these cases manually:
User is not logged in and anon_create_dataset = True: neither
Organization nor Visibility shows, either when creating or when updating
a dataset.
User is logged in, but is not a member of any organization: neither
Organization nor Visibility shows, either when creating or when updating
a dataset. Tested both when the site has no organizations and when the
site does have orgs but user is not a member of any.
User is logged in, and is a member of an organization: Both Organization
and Visibility show when creating a dataset.
When creating a private dataset, no activities appear in the activity
stream.
User is logged in, and is a member of an organization, but dataset is
not a member of any org: neither Organization nor Visibility shows when
updating a dataset.
User is logged in, and is a member of an organization, and dataset is a
member of any org: Visibility shows but Organization does not show when
updating a dataset.
User is sysadmin, site has no orgs: neither Organization nor Visibility
shows when creating or updating a dataset.
User is sysadmin, site does have orgs: both Organization and Visibility
show when creating or updating a dataset.
Compare: https://github.com/okfn/ckan/compare/b81a5fb1e26f^...3b9ae1c938d7
More information about the ckan-changes
mailing list