diff options
Diffstat (limited to 'core/js/files')
-rw-r--r-- | core/js/files/client.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/core/js/files/client.js b/core/js/files/client.js index 3fe24e62508..0109ab9fdbf 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; @@ -320,7 +332,7 @@ } } - data.permissions = OC.PERMISSION_READ; + data.permissions = OC.PERMISSION_NONE; var permissionProp = props[Client.PROPERTY_PERMISSIONS]; if (!_.isUndefined(permissionProp)) { var permString = permissionProp || ''; @@ -333,6 +345,9 @@ case 'K': data.permissions |= OC.PERMISSION_CREATE; break; + case 'G': + data.permissions |= OC.PERMISSION_READ; + break; case 'W': case 'N': case 'V': |