feat(permissions): Add support for separate REACT permission#5754
Open
luflow wants to merge 5 commits intonextcloud:masterfrom
Open
feat(permissions): Add support for separate REACT permission#5754luflow wants to merge 5 commits intonextcloud:masterfrom
luflow wants to merge 5 commits intonextcloud:masterfrom
Conversation
373af2f to
294c178
Compare
Author
|
@AndyScherzinger just updated this branch based on feedback in spreed-PR - also wrote a small migration guide that covers all changes to be more understandable :) https://github.com/luflow/spreed/blob/93bedef92873edbf7a4ae28730c0d514a1cd2f97/docs/react-permission-integration.md |
Collaborator
|
thank you @luflow , great idea 👍 |
Collaborator
|
i will come back to this when the server PR is merged ;) |
612e90a to
18629f7
Compare
Adds compatibility with nextcloud/spreed#16835 which splits the combined CHAT permission into separate CHAT (128) and REACT (256) permissions. This enables "announcement channels" where only moderators can post messages, but all users can still react. Changes: - Add REACT (256) permission constant to ParticipantPermissions - Add hasReactPermission() method with backward compatibility fallback - Update MessageActionsDialog to use react permission for emoji bar - Add permission check in onClickReaction() for toggling reactions - Add unit tests for new permission handling Signed-off-by: Florian Ludwig <[email protected]>
- Add REACT_PERMISSION feature to SpreedFeatures enum - Update hasReactPermission() to check react-permission capability first - Fall back to chat-permission/CHAT bit for older servers - Expand unit tests for all capability scenarios Signed-off-by: Florian Ludwig <[email protected]>
…sponding error message Signed-off-by: Florian Ludwig <[email protected]>
Signed-off-by: Florian Ludwig <[email protected]>
Servers that support react-permission also support chat-permission since it is an older capability. Update test setup to reflect this realistic server configuration. Signed-off-by: Florian Ludwig <[email protected]>
4661e53 to
51567c6
Compare
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.
Adds compatibility with nextcloud/spreed#16835 which splits the combined CHAT permission into separate CHAT (128) and REACT (256) permissions.
This enables "announcement channels" where only moderators can post messages, but all users can still react.
Changes:
🏁 Checklist
/backport to stable-xx.x