mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
prohibit share of an encrypted folder
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
75774ed2ce
commit
66746a6b12
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue