generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add grant to Record class methods (#859)
This PR fixes a bug where the `Record` class method which is retrieved with queries, reads, and writes did not respect the delegated permission state. The `Record` class now accepts an optional PermissionsApi so that it can share the TTL cache with a caller. If one is not provided a new one is instantiated from the agent that is passed. Took advantage of removing the specific `CachedPermissions` class and wrapped it into the `PermissionsApi` interface. Refactored some unnecessary abstractions when fetching the grant, added tests for missing cases and subscription cases.
- Loading branch information
1 parent
3da24db
commit 7fc1f1d
Showing
21 changed files
with
1,712 additions
and
761 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@web5/agent": minor | ||
"@web5/identity-agent": minor | ||
"@web5/proxy-agent": minor | ||
"@web5/user-agent": minor | ||
--- | ||
|
||
Tefactor getting permissions for grants into a single Permission API interface |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@web5/api": patch | ||
--- | ||
|
||
Consume single PermissionApi for dealing with permissions, fix bug for Record class not fetching delegate permissions for request. |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.