diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-09-19 12:53:35 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-11-20 18:24:46 +0100 |
commit | fc456bec39446880ca6153ef903b569f041dd087 (patch) | |
tree | 166ef0ba530ed7c4e3e556b6ed6dc46587dec328 /core/js/files | |
parent | f347e2e4a6cab71c35d58ff21692e23d7443db60 (diff) | |
download | nextcloud-server-fc456bec39446880ca6153ef903b569f041dd087.tar.gz nextcloud-server-fc456bec39446880ca6153ef903b569f041dd087.zip |
check for encryption state on propfind
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'core/js/files')
-rw-r--r-- | core/js/files/client.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/js/files/client.js b/core/js/files/client.js index fa3d795d412..dc842a9d3bf 100644 --- a/core/js/files/client.js +++ b/core/js/files/client.js @@ -74,6 +74,7 @@ Client.PROPERTY_PERMISSIONS = '{' + Client.NS_OWNCLOUD + '}permissions'; Client.PROPERTY_SIZE = '{' + Client.NS_OWNCLOUD + '}size'; Client.PROPERTY_GETCONTENTLENGTH = '{' + Client.NS_DAV + '}getcontentlength'; + Client.PROPERTY_ISENCRYPTED = '{' + Client.NS_DAV + '}is-encrypted'; Client.PROTOCOL_HTTP = 'http'; Client.PROTOCOL_HTTPS = 'https'; @@ -120,6 +121,10 @@ * Mount type */ [Client.NS_NEXTCLOUD, 'mount-type'], + /** + * Encryption state + */ + [Client.NS_NEXTCLOUD, 'is-encrypted'], ]; /** @@ -305,6 +310,13 @@ data.hasPreview = true; } + var isEncryptedProp = props['{' + Client.NS_NEXTCLOUD + '}is-encrypted']; + if (!_.isUndefined(isEncryptedProp)) { + data.isEncrypted = isEncryptedProp === '1'; + } else { + data.isEncrypted = false; + } + var contentType = props[Client.PROPERTY_GETCONTENTTYPE]; if (!_.isUndefined(contentType)) { data.mimetype = contentType; |