Skip to content

Commit

Permalink
Merge pull request #7067 from nextcloud/backport/7062/stable-3.12
Browse files Browse the repository at this point in the history
[stable-3.12] only add Encrypt context menu entry for top folder in settings dialog
  • Loading branch information
mgallien authored Sep 4, 2024
2 parents 3741012 + 6b96aee commit 524d1b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,9 @@ void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index

const auto isEncrypted = info->isEncrypted();
const auto isParentEncrypted = _model->isAnyAncestorEncrypted(index);
const auto isTopFolder = index.parent().isValid() && !index.parent().parent().isValid();

if (!isEncrypted && !isParentEncrypted) {
if (!isEncrypted && !isParentEncrypted && isTopFolder) {
ac = menu.addAction(tr("Encrypt"));
connect(ac, &QAction::triggered, [this, info] { slotMarkSubfolderEncrypted(info); });
} else {
Expand Down

0 comments on commit 524d1b7

Please sign in to comment.