Skip to content

Project permission management #311

@YousefED

Description

@YousefED

Exploring different ideas on how we can implement "Projects": multiple documents with parent / child relationships and permission management.

Must have
User must be able to:

  • create a project
  • create new pages in a project
  • create subpages of existing pages in a project
  • move pages in a project to a different location in the project-tree
  • share a project with other users

should have

  • add pages to the project (or sub tree) that are not created in the scope of the project (i.e.: by a different user, or pre-existing pages). This probably means pages can have multiple parents
  • share pages and subpages with users. Child pages should inherit permissions from its parent
  • creating projects and moving documents should work offline, i.e. when not connected to matrix

Research re. Matrix permission management

Atm, we can set permissions for Rooms. Matrix has introduced Spaces, but is still figuring out authentication rules around this. Relevant MSCs:

Summary: this is not covered yet by Matrix, and part if this (cascading room permissions) was at least identified in 3083.

Brainstorming possible fixes:

  1. ensuring the permissions "one by one" when moving a room. Difficulties:
    -- Would need a separate way to track whether a user that has joined, has joined "via the old parent room's permission", or has been invited directly to the child room.
  2. Password protecting rooms, and posting the password in parent room (Matrix doesn't support password protected rooms yet)
  3. Matrix plugin / application service that manages these kind of permissions
  4. Storing "child docs" inside the parent doc. Disadvantages:
    -- diverts from the "typecell model" (documents live as separate entities in a web"
    -- permissions not manageable per child doc
    -- loss of crdt based collaboration when moving child docs to a different parent

Other related challenges:

  • if we store parent / child relationships in a document, how do we make sure they are in-sync with each other (avoid race conditions).

Maybe the most realistic option for now is to use a Space hierarchy and permission management from MSC3083. Later, we need to extend this (maybe with the help of Matrix folks) to make sure permissions are retracted when moving items to a different parent.

Challenges with this:

  • make sure space hierarchy and document rels are in-sync. Ideally it would be possible to move documents around while offline, and sync up to matrix later
  • at some point we should fix revocation, or warn the user when moving a document that user access is not revoked.
  • How to make sure document power levels are in sync / copied?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions