-
Notifications
You must be signed in to change notification settings - Fork 4
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
Documentation for public sharing level and entity-specific permissions #483
Open
marcua
wants to merge
1
commit into
main
Choose a base branch
from
permissions-documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -251,6 +251,52 @@ of | |
[rqlite](https://rqlite.io/docs/guides/backup/#automatic-backups). Thank | ||
you to the authors for their great design and documentation. | ||
|
||
### Permissions | ||
|
||
By default, only the owner / creator of an `ayb` database can access | ||
it. It's possible to share `ayb` databases in two ways: | ||
* By setting the public sharing level of the database to give any entity access to the database. | ||
* By sharing the database with a particular entity. | ||
|
||
To set the public sharing level of a database, select one of the following options: | ||
``` | ||
|
||
# The default setting: no entity will be able to access the database | ||
# (unless they specifically get permissions). | ||
ayb client update_database marcua/test.sqlite --public-sharing-level no-access | ||
|
||
# With a public sharing level of `fork`, entities will be able to see | ||
# the database in the owner's list of databases using `ayb client | ||
# list` and fork a copy of the database under their own account. They | ||
# won't be able to query the database unless they fork it. Note: | ||
# Listing access is implemented today, but forking one database into | ||
# another account is not yet implemented. | ||
ayb client update_database marcua/test.sqlite --public-sharing-level fork | ||
|
||
# In addition to the listing and forking access that `fork` | ||
# allows, `read-only` access allows any entity to | ||
# issue a read-only (e.g., SELECT) query against the database. They | ||
# can't modify the database. | ||
ayb client update_database marcua/test.sqlite --public-sharing-level read-only | ||
``` | ||
|
||
To provide a specific user with access to a database, select one of the following: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everything below here is not yet implemented |
||
``` | ||
# Revoke access to a database from an entity. | ||
ayb client permissions marcua/test.sqlite sofia no-access | ||
|
||
# Allow an entity to make read-only (e.g., SELECT) queries against a | ||
# database. | ||
ayb client permissions marcua/test.sqlite sofia read-only | ||
|
||
# Allow an entity to make any type of query against a database. | ||
ayb client permissions marcua/test.sqlite sofia read-write | ||
|
||
# Allow an entity to not only modify a database, but also to change | ||
# the permissions of any non-owner entity. | ||
ayb client permissions marcua/test.sqlite sofia manager | ||
``` | ||
|
||
### Isolation | ||
`ayb` allows multiple users to run queries against databases that are | ||
stored on the same machine. Isolation enables you to prevent one user | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make these consistent with the other CLI examples (e.g., prefix with $, consider showing output). Not sure about showing output as the commands themselves are clear.