-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add RESTful API endpoints for Groups customizations #570
Commits on Sep 20, 2022
-
Upgrade @aws-sdk/client-cognito-identity-provider so we can import ex…
…ception classes Otherwise we have to do string comparison on the exception names instead of cleaner instanceof checks. I was confused for a bit because the documentation says you can import these classes but that wasn't working in practice when I first tried it. Turns out we require 3.52.0 and the classes weren't exported until 3.53.0, just one release later!
Configuration menu - View commit details
-
Copy full SHA for 6d88614 - Browse repository at this point
Copy the full SHA 6d88614View commit details
Commits on Sep 21, 2022
-
Jest version 26 does not play well with ESM circular dependencies (to be added in future commits) that work fine in production. Errors look like: RangeError: Maximum call stack size exceeded Exception in PromiseRejectCallback: internal/vm/module.js:321 const module = await linker(identifier, this); These errors go away with the next major version (27).
Configuration menu - View commit details
-
Copy full SHA for 6ef1ec2 - Browse repository at this point
Copy the full SHA 6ef1ec2View commit details -
Add Group objects to the authz system
For actions on the group itself (e.g. membership management) rather than the group's Source of datasets and narratives.
Configuration menu - View commit details
-
Copy full SHA for bf7eecf - Browse repository at this point
Copy the full SHA bf7eecfView commit details -
Establish /groups/:groupName/settings/… route namespace for endpoints
The Group management API (members, roles, overview, logo, etc) will live under here. Using a single namespace (…/settings/…) means we only add a single new forbidden prefix for user-chosen dataset names in the group (i.e. in addition to the existing …/narratives/… namespace). Routes under this namespace are only visible to users with Read access to the Group itself (not the GroupSource), i.e. access is limited to group members even for public groups.
Configuration menu - View commit details
-
Copy full SHA for 833ea30 - Browse repository at this point
Copy the full SHA 833ea30View commit details -
Previously, only GroupSource.group was available. Having the inverse, Group.source, allows for more direct access. However, maintaining both of these properties in the object constructors results in a bad cyclic dependency. Since GroupSource.group is already set in its constructor, adding Group.source as a computed property. Update existing code to use this new property as a shortcut to create new GroupSource instance.
Configuration menu - View commit details
-
Copy full SHA for c327545 - Browse repository at this point
Copy the full SHA c327545View commit details
Commits on Sep 27, 2022
-
Move code handling upstream URL requests to its own file
This allows for reuse later with other endpoints. DELETE: Extract the logic of creating multiple DELETE requests in deleteResource to its own function. GET: Extract the call to proxyResponseBodyFromUpstream in sendSubresource to its own function. PUT: Extract the logic of creating a PUT request in receiveSubresource to its own function. This requires a new type, upstreamUrlExtractor, to be used since the URL for these requests are dependent on the method and headers, which are defined in the new function.
Configuration menu - View commit details
-
Copy full SHA for ccb98c3 - Browse repository at this point
Copy the full SHA ccb98c3View commit details -
Add RESTful API endpoints for customizing Groups
Read-write access for group owners, read-only access for all other members of a group, and no access for non-members.
Configuration menu - View commit details
-
Copy full SHA for 6b48bc9 - Browse repository at this point
Copy the full SHA 6b48bc9View commit details