-
Notifications
You must be signed in to change notification settings - Fork 15
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
(api) Enrich statements (including with authority) and enforce authority when querying #405
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In link with #288 , we need a mechanism to assign an "Agent" (in the sense of the xAPI specification) to a user (to later be able to infer the "Authority" field when writing a statement). It was proposed to add the "agent" representation as a field in the user credentials, which is what is implemented here. There is no contraint as to which of the 4 valid IFI's must be used. BREAKING: New users must now include an agent field It affects both Basic HTTP and OpenIdConnect authentication methods.
In link with #288 , we need a mechanism to fetch statements by authority. It has been decided that the GET /statements endpoint will implement a mine option (not in xAPI specification), which is used to return only the statements for which the "authority" field matches the "agent" field of the current user (stored in credentials since #342, or given through token claims). With future implementation of permissions, it is expected that the use of mine option will be made mandatory for users of the API that do not have full read access. The idea behind this is to make any filtering obvious to the user ("explicit is better than implicit"). This commit adds mine by fetching user "agent" field and querying using a new database query field.
Rename `fetch` & `push` to `read` & `write` in cli for consistency with the new backend syntax.
Co-authored-by: Julien Maupetit <[email protected]>
… rename-cli-fetch-push
Scope of this PR is too large. See the intermediate PR: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WORK IN PROGRESS (do not review)
Purpose
Description...
Proposal
Description...
id
,timestamp
,stored
,authority