prohibit share of an encrypted folder

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2022-11-17 12:50:59 +01:00
parent 75774ed2ce
commit 66746a6b12
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -244,7 +244,7 @@ public class FileMenuFilter {
private void filterEncrypt(List<Integer> toHide, boolean endToEndEncryptionEnabled) { private void filterEncrypt(List<Integer> toHide, boolean endToEndEncryptionEnabled) {
if (files.isEmpty() || !isSingleSelection() || isSingleFile() || isEncryptedFolder() || isGroupFolder() if (files.isEmpty() || !isSingleSelection() || isSingleFile() || isEncryptedFolder() || isGroupFolder()
|| !endToEndEncryptionEnabled || !isEmptyFolder()) { || !endToEndEncryptionEnabled || !isEmptyFolder() || isShared()) {
toHide.add(R.id.action_encrypted); toHide.add(R.id.action_encrypted);
} }
} }
@ -547,4 +547,13 @@ public class FileMenuFilter {
} }
return true; return true;
} }
private boolean isShared() {
for (OCFile file : files) {
if (file.isSharedViaLink() || file.isSharedWithSharee()) {
return true;
}
}
return false;
}
} }