Skip to content
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

Set document to readonly when a user is not allowed to create / update #18076

Draft
wants to merge 22 commits into
base: v15/dev
Choose a base branch
from

Conversation

madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented Jan 22, 2025

This PR ensures that the document workspace set to readonly if a user doesn't have permissions to create or update.

This PR updates the document workspace context to check for create and update permissions. The workspace now correctly behaves for a user with

  • browse: The UI is readonly. The user can't access the save button.
  • create: The user can create a document but it becomes readonly after creation is done.
  • update: The user can only edit already created documents.

Test cases

Permissions

  • User can browse
  • User can browse + create
  • User can browse + update
  • User can browse + create + update

Language Permissions

  • User only have access to specific languages

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