[network/ruqola] src/widgets/room: Allow to change e2e if we are owner
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 20bb9222210657c2c29194623ace2bb848cfba99 by Laurent Montel.
Committed on 07/08/2026 at 05:48.
Pushed by mlaurent into branch 'master'.
Allow to change e2e if we are owner
M +3 -1 src/widgets/room/channelactionpopupmenu.cpp
https://invent.kde.org/network/ruqola/-/commit/20bb9222210657c2c29194623ace2bb848cfba99
diff --git a/src/widgets/room/channelactionpopupmenu.cpp b/src/widgets/room/channelactionpopupmenu.cpp
index 32aec25579..569358efed 100644
--- a/src/widgets/room/channelactionpopupmenu.cpp
+++ b/src/widgets/room/channelactionpopupmenu.cpp
@@ -202,7 +202,9 @@ void ChannelActionPopupMenu::slotUpdateMenu()
mExportMessages->setVisible(mCurrentRocketChatAccount->hasPermission(u"mail-messages"_s));
- mEncryptMessages->setVisible(mRoom->encryptedEnabled()); // Hide when not private channels or not direct
+ mEncryptMessages->setVisible(mRoom->encryptedEnabled()
+ && (mRoom->channelType() == Room::RoomType::Direct || mRoom->channelType() == Room::RoomType::Private)
+ && mRoom->hasPermission(u"set-owner"_s));
mEncryptMessages->setChecked(mRoom->encrypted());
const bool hasPermissionToBan = mRoom && mRoom->hasPermission(u"ban-user"_s)