Skip to content

Prevent users from manipulating comments (LEAN-5385) - #315

Open
asouqi wants to merge 7 commits into
masterfrom
LEAN-5385
Open

asouqi wants to merge 7 commits into
masterfrom
LEAN-5385

Conversation

@asouqi

@asouqi asouqi commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/schema/nodes/comment.ts Outdated
@asouqi
asouqi requested a review from mbartenev-atypon April 13, 2026 23:19
@asouqi
asouqi marked this pull request as ready for review June 17, 2026 14:37
Copilot AI review requested due to automatic review settings June 17, 2026 14:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces an Attribute-Based Access Control (ABAC) policy layer for ProseMirror manuscript nodes, aimed at preventing unauthorized users from manipulating comment nodes (LEAN-5385).

Changes:

  • Added src/lib/access-control.ts defining access context/types and a comment node policy for insert/delete/attribute updates.
  • Exported the new access-control module from the package entrypoint (src/index.ts).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/lib/access-control.ts Adds ABAC policy definitions and policy lookup for protected node types (currently comment).
src/index.ts Exposes the new access-control API via the library’s public exports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/access-control.ts
Comment thread src/lib/access-control.ts
Comment thread src/lib/access-control.ts
Comment thread src/lib/access-control.ts
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.

3 participants