Skip to content

Former editor with revoked write permissions can edit a file in a yjs session #3133

Open

Description

@JammingBen

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

An former editor with revoked write permissions can edit a file in a yjs session through another user's saves.

Reproduction Steps

  • open a text file in a space with user a (manager) and user b (editor)
  • open a second tab as user a and degrade user b to viewer
  • as user b, make edits to the file without saving it
  • as user a, save the file

Expected Outcome

The user can't edit the file the moment they get downgraded/removed from the space.

Actual Outcome

They can edit and save their changes through another user with write permissions.

The proper solution to this are SSE events to communicate the membership changes. Polling is most likely out of the question because a) it's expensive to fetch space permissions and b) it might still come in delayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions