Skip to content

Refactor permissions and add unit tests #68

Closed

Description

@ecton

After adding permissions in #51, we ended up with an automatically checked permissions layer at the API level in PliantDb. This layer can be extended into the custom API. This sounded like a great way to bootstrap the permissions system, and it was.

But, there was an option when doing this: first was to just use actionable for the custom API but implement permissions inside of PliantDb separately. The question was: did I want to support permission-restrictions on local database operations? At the time, I thought it would purely be for unit testing, so I opted not to.

Since then, I have realized that I do want it for unit tests, but also for general purpose application development. When thinking of a database application that doesn't need to allow clients to connect to the database over a network, if you aren't allowed to define permission models and enforce them, you'll have a host of new problems if you decide to switch in the future.

This issue is to track a refactor moving permissions checks into pliantdb-local.

  • Add unit tests for all current permission checks.
  • Modify current dispatchers in Server to use none protection.
  • Re-implement permission checks in pliantdb-local using effective_permissions from Add User Authentication #64.
  • Make Database::with_effective_permissions() public.

Activity

  1. moved this to Backburner in Beta Roadmapon Oct 27, 2021
  2. moved this to Backburner in Beta Roadmapon Oct 27, 2021
  3. added this to the v0.1.0 milestone on Nov 3, 2021
  4. moved this from Backburner to Todo in Beta Roadmapon Feb 14, 2022
  5. self-assigned this
    on Mar 7, 2022
  6. linked a pull request that will close this issueMake BonsaiDb able to be run in non-async code #220on Mar 7, 2022
  7. added a commit that references this issue on Mar 7, 2022
  8. modified the milestones: v1.0, vNext on Mar 7, 2022
  9. moved this from Todo to In Progress in Beta Roadmapon Mar 7, 2022
  10. Repository owner moved this from In Progress to Done in Beta Roadmapon Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestmultiuserIssues impacting multi-user support

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions