-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #388 from secretkeylabs/release/v0.38.1
release: v0.38.1 to main
- Loading branch information
Showing
74 changed files
with
2,406 additions
and
392 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Permissions | ||
|
||
A "connection request" is a request for permissions. | ||
|
||
In the future, clients may be able to specify which permissions they're requesting. For now, there's only a single permission available: `read`ing an account. Since there's only a single permission, no arguments are required. | ||
|
||
Permissions are granted per-account. A permissions request is processed in the context of the currently active account. In the future, we may allow changing account prior to granting permissions. | ||
|
||
## Technical overview | ||
|
||
Permissions store: an object containing a version, and the relationships between clients, resources and permissions. Contains "store" in the name because this object is stored as a whole with `chrome.storage.local` | ||
|
||
A mutex is provided for environments where race-conditions could occur when mutating the permissions store. | ||
|
||
The exports available from [`utils.ts`](./utils.ts) can be used to perform all necessary permissions operations. When using them within a reactive context such as a React application, it is necessary to construct reactive helpers to ensure the app is using the latest store data available. |
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,2 @@ | ||
/* eslint-disable import/prefer-default-export */ | ||
export const permissionsPersistantStoreKeyName = 'client-permissions'; |
Oops, something went wrong.