Feat/split chat react permissions#16920
Merged
nickvergessen merged 19 commits intomainfrom Jan 30, 2026
Merged
Conversation
This change separates the combined "chat" permission into two distinct permissions: - PERMISSIONS_CHAT (128): For posting messages - PERMISSIONS_REACT (256): For adding/removing reactions This allows admins to create "announcement channels" where only moderators can post messages, but all users can still react to those messages. Backend changes: - Added PERMISSIONS_REACT constant to Attendee model - Added REACT permission check in InjectionMiddleware - Updated ReactionController to use REACT permission instead of CHAT - Added database migration to grant REACT permission to users with CHAT - Fixed hardcoded 255 validation in RoomService Frontend changes: - Added REACT constant to constants.ts - Split PermissionsEditor into two separate checkboxes - Updated MessageItem to check REACT permission for canReact Resolves: #11329 Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Signed-off-by: Florian Ludwig <florian@krautnerds.de>
Add 'react-permission' to the FEATURES array and document it in capabilities.md for Talk 24. This allows clients to detect when the server supports the separate REACT permission (256) for adding reactions. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Check for 'react-permission' capability and fall back to CHAT permission when federating with older servers that don't support the separate REACT permission. Also adds 'react-permission' to mocked capabilities for tests. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Update expected participantPermissions from 254 to 510 to reflect the new MAX_DEFAULT value that includes the REACT permission (256). Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Document the changes needed for Android, iOS, and desktop clients to support the new separate reaction permission. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Add config.permissions.max-default and config.permissions.max-custom to the capabilities API. This allows clients to read the maximum permission values from the server instead of hardcoding them. - lib/Capabilities.php: Add permissions config section with values from Attendee::PERMISSIONS_MAX_DEFAULT (510) and MAX_CUSTOM (511) - lib/ResponseDefinitions.php: Add psalm type for permissions config - openapi-full.json: Add permissions object to Capabilities schema - Regenerate TypeScript types Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Update permissions UI components to respect the react-permission capability and read MAX values from the API when available. PermissionsEditor.vue: - Add hasReactPermissions computed property - Show combined "Can post messages and reactions" for older servers - Conditionally show separate REACT checkbox when capability exists - Use maxDefaultPermission from API with bitwise fallback ConversationPermissionsSettings.vue: - Add maxDefaultPermission/maxCustomPermission computed properties - Read values from config.permissions API when available - Fall back to PERMISSIONS.MAX_DEFAULT & ~PERMISSIONS.REACT for older servers without the capability Mock capabilities updated for tests. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
- Add config.permissions.max-default and max-custom to capabilities.md - Rename variable to hasReactPermissions in MessageItem.vue for clarity Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
The OpenAPI schema was validating permissions input against the old maximum value of 255, which blocked setting the new REACT permission (256). Updated annotations and schema to allow values up to 511 (PERMISSIONS_MAX_CUSTOM). Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
…lowed Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Button was showing a color change on click even though button was disabled. Action Buttons (attachments + voice recording) did not have this weird behavior when disabled. Might be actually a bug in the vue components - hotfixed via :deep selector Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
- Remove disabled button CSS hotfixes (to be fixed upstream) - Fix chatReactions logic to only set when capability exists Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
The new permissions config section was added but the OpenAPI specs weren't regenerated and the PHP unit tests weren't updated with the expected permissions values. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
The testCapabilitiesDocumentation test iterates over all config sections from OpenAPI and checks LOCAL_CONFIGS for each. The new permissions section was missing, causing a TypeError. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
Since permissions has no local (user-specific) configs, its LOCAL_CONFIGS entry is an empty array. The type must allow list<string> instead of non-empty-list<string> to accommodate this. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
The change from non-empty-list<string> to list<string> in ResponseDefinitions requires removing minItems: 1 from the config-local arrays in the OpenAPI specs. Signed-off-by: Florian Ludwig <florian.ludwig@uninow.de>
21 tasks
Member
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☑️ Resolves