Skip to content

fix(text): open read-only card sessions - #8826

Closed
whoalin1 wants to merge 1 commit into
nextcloud:mainfrom
whoalin1:fix/readonly-card-text-session
Closed

whoalin1 wants to merge 1 commit into
nextcloud:mainfrom
whoalin1:fix/readonly-card-text-session

Conversation

@whoalin1

Copy link
Copy Markdown

Closes #8742

PermissionService::checkPermission() throws NoPermissionException when edit access is missing rather than returning false. Because TextContextProvider treated the permission check as a boolean, read-only board members never reached the intended read-only session path and the card description stayed empty.

The provider now treats missing edit permission as a read-only session. Content loading still goes through CardService::find(), so users without read access remain unable to read the card.

Validation:

  • php -l lib/Provider/TextContextProvider.php tests/unit/Provider/TextContextProviderTest.php: passed
  • Full tests/unit/Provider/TextContextProviderTest.php: 7 tests passed, 10 assertions
  • Tests were run in a PHP 8.3 container with a minimal PHPUnit bootstrap because no installed Nextcloud server was available in this environment; lightweight Text interface stubs were used because the separate Text app is not part of this checkout
  • Not tested against a live Nextcloud instance

Assisted by Devin:unknown

The permission service signals missing edit access by throwing, so read-only board members never received a Text session for card descriptions. Treat that exception as read-only access while content loading continues to enforce read permission.

Assisted-by: Devin:adaptive
Signed-off-by: Man Alin <whoalin414@gmail.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@whoalin1
whoalin1 force-pushed the fix/readonly-card-text-session branch from 93779e2 to 3de0b23 Compare November 29, 2026 16:05
@blizzz

blizzz commented Nov 30, 2026

Copy link
Copy Markdown
Member

Duplicate of #8739

@blizzz blizzz closed this Nov 30, 2026
@blizzz blizzz marked this as a duplicate of #8739 Nov 30, 2026
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.

Read-only board members can't see card descriptions: Text session fails with NoPermissionException

2 participants