From 262f10af9a7e27e01dd372c56db2ab29207744fb Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 11 Jun 2020 16:59:14 +0200 Subject: [PATCH] Remove ability to kick or ban yourself --- .../features/roommemberprofile/RoomMemberProfileController.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/riotx/features/roommemberprofile/RoomMemberProfileController.kt b/vector/src/main/java/im/vector/riotx/features/roommemberprofile/RoomMemberProfileController.kt index 094177bcae..b70be02d63 100644 --- a/vector/src/main/java/im/vector/riotx/features/roommemberprofile/RoomMemberProfileController.kt +++ b/vector/src/main/java/im/vector/riotx/features/roommemberprofile/RoomMemberProfileController.kt @@ -227,8 +227,8 @@ class RoomMemberProfileController @Inject constructor( return } val membership = state.asyncMembership() ?: return - val canKick = state.actionPermissions.canKick - val canBan = state.actionPermissions.canBan + val canKick = !state.isMine && state.actionPermissions.canKick + val canBan = !state.isMine && state.actionPermissions.canBan val canEditPowerLevel = state.actionPermissions.canEditPowerLevel if (canKick || canBan || canEditPowerLevel) { buildProfileSection(stringProvider.getString(R.string.room_profile_section_admin))