mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Merge pull request #11052 from nextcloud/doNotAllowSharedEncryptedFolder
prohibit share of an encrypted folder
This commit is contained in:
commit
ab13b9873c
1 changed files with 10 additions and 1 deletions
|
@ -244,7 +244,7 @@ public class FileMenuFilter {
|
|||
|
||||
private void filterEncrypt(List<Integer> toHide, boolean endToEndEncryptionEnabled) {
|
||||
if (files.isEmpty() || !isSingleSelection() || isSingleFile() || isEncryptedFolder() || isGroupFolder()
|
||||
|| !endToEndEncryptionEnabled || !isEmptyFolder()) {
|
||||
|| !endToEndEncryptionEnabled || !isEmptyFolder() || isShared()) {
|
||||
toHide.add(R.id.action_encrypted);
|
||||
}
|
||||
}
|
||||
|
@ -547,4 +547,13 @@ public class FileMenuFilter {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isShared() {
|
||||
for (OCFile file : files) {
|
||||
if (file.isSharedWithMe() || file.isSharedViaLink() || file.isSharedWithSharee()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue