Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History/Sharable model user sharing API #2340

Merged
merged 6 commits into from May 16, 2016

Conversation

Projects
None yet
2 participants
@carlfeberhard
Copy link
Contributor

commented May 10, 2016

Adds de/serializers to sharable models (although only history fully uses this manager ATM) for users_shared_with.

To get the ids of users a history has been shared with, the consumer (of the serializer - e.g. the API) must request it specifically: api/histories/{:id}?view=summary&keys=users_shared_with or just api/histories/{:id}?keys=id,users_shared_with, etc. The field is returned as a list of encoded user ids.

To change/update or add/remove a user from those the history is shared with, PUT a new list of encoded user ids that include any new user ids to be added and exclude any old to be removed. Invalid user ids are silently skipped (which may change later).

Nudges #783

carlfeberhard added some commits May 10, 2016

API, sharable: serialize users_shared_with
- Changes sharable serializers so that, when requested with
`keys=users_shared_with`, they return a list of encoded user ids for
each user that the item has been shared with
- Adds tests in test_HistoryManager
Testing: fixes galaxy_mock set_datatypes_registry
- Add the datatypes_registry to the mock app using an empty registry
API, sharable: deserialize users_shared_with
- Adds a deserializer for users_shared_with. PUT a list of user ids
to update who an item is shared with.
- Invalid users are skipped, bad ids error
- (Only affects histories ATM)
- Tests added to test_HistoryManager
API, history: skip users_shared_with for non-owner
- If the requesting user is not the owner, don't return
users_shared_with even when requested
- add tests
@carlfeberhard

This comment has been minimized.

Copy link
Contributor Author

commented May 12, 2016

Updated to only return users_shared_with if the user making the request is the owner.

@dannon

This comment has been minimized.

Copy link
Member

commented May 16, 2016

New keys work, as seen:

image

@dannon dannon merged commit ddc2412 into galaxyproject:dev May 16, 2016

3 of 4 checks passed

toolshed test Build finished.
Details
api test Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished.
Details

@carlfeberhard carlfeberhard deleted the carlfeberhard:history.sharing-api branch Jun 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.