Skip to content

feat: setup project to use hocuspocus v3 #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

Open
wants to merge 2 commits into
base: rollback-updates
Choose a base branch
from

Conversation

nperez0111
Copy link

This implements the RejectUnauthorized extension with the proposed PR ueberdosis/hocuspocus#919 into hocuspocus

While I was at it, since the PR is based on Hocuspocus v3, I had to update the usage in this project to match hocuspocus 3. It is not changed in the package.json yet.

We need to wait to see if the PR goes through before trying to merge this in


data.connection.readOnly = authInfo.role === "COMMENT-ONLY";
data.connectionConfig.readOnly = authInfo.role === "COMMENT-ONLY";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to double check whether this does what I think it does....

database: "db.sqlite",
database: ":memory:",
}),
// TODO we can actually just do the auth check in here, and not need the server to inject the mark or anything
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might actually really simplify things, if we choose to do the authorization at the hocuspocus layer instead, it would allow clients to safely make modifications to the threads on their side. To make it safe though, we need to inspect what exactly was updated (i.e. they can only modify their own comments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant