mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-06 01:21:39 -04:00
feat: check permissions in realtime code and frontend
Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
24f1b2a361
commit
c2f41118b6
27 changed files with 287 additions and 66 deletions
|
@ -10,9 +10,17 @@ import { YDocSyncAdapter } from './y-doc-sync-adapter.js'
|
|||
export class YDocSyncServerAdapter extends YDocSyncAdapter {
|
||||
constructor(
|
||||
readonly messageTransporter: MessageTransporter,
|
||||
readonly doc: RealtimeDoc
|
||||
readonly doc: RealtimeDoc,
|
||||
readonly acceptEdits: boolean
|
||||
) {
|
||||
super(messageTransporter, doc)
|
||||
this.markAsSynced()
|
||||
}
|
||||
|
||||
protected applyIncomingUpdatePayload(update: number[]): void {
|
||||
if (!this.acceptEdits) {
|
||||
return
|
||||
}
|
||||
super.applyIncomingUpdatePayload(update)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue