-
Notifications
You must be signed in to change notification settings - Fork 369
Fix : iterate on unban permissions #5959
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
Conversation
…missions.canBan" This reverts commit 7c8830b.
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #5959 +/- ##
===========================================
- Coverage 81.40% 81.40% -0.01%
===========================================
Files 2535 2535
Lines 67624 67626 +2
Branches 8669 8669
===========================================
- Hits 55050 55049 -1
- Misses 9365 9367 +2
- Partials 3209 3210 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bmarty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. A bit annoying that no unit tests have to be updated after this change. It means that some unit tests are missing.
| when (membership) { | ||
| RoomMembershipState.BAN -> { | ||
| // Unban requires both kick and ban permission instead of a dedicated unban permission | ||
| if (permissions.canBan && permissions.canKick) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A detail, but maybe move the logic and comment to RoomMemberModerationPermissions like this:
// Unban requires both kick and ban permission instead of a dedicated unban permission
val canUnban = canKick && canBan
|



Content
After more tests on our side (and digging with the backend team), we need both kick and ban permissions to unban someone.
Also we reverted the logic for displaying banned users to having the ban permission.
Motivation and context
Better ux.
Screenshots / GIFs
No ui change.
Tests
Tested devices
Checklist