summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/share.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-07-02 16:38:20 +0200
committerVincent Petry <pvince81@owncloud.com>2015-07-02 16:38:20 +0200
commit71ae96bb56c668e8bc587e89ce9cf55e22fe7455 (patch)
treeb275c7169c8b5178a6290af6ef83f008cd2b8d44 /apps/files_sharing/js/share.js
parent063071b58db926238e895105e13a116a5ceebddb (diff)
downloadnextcloud-server-71ae96bb56c668e8bc587e89ce9cf55e22fe7455.tar.gz
nextcloud-server-71ae96bb56c668e8bc587e89ce9cf55e22fe7455.zip
Do not show static share owner if not available
In some corner cases, an outgoing share exists but sharing is not allowed for the current user. This would cause the file list to break because the static text could not be rendered as the owner was undefined.
Diffstat (limited to 'apps/files_sharing/js/share.js')
-rw-r--r--apps/files_sharing/js/share.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 11c3170c2f0..0c7d5f3c576 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -151,7 +151,7 @@
var permissions = $tr.data('permissions');
var hasLink = !!(shareStatus && shareStatus.link);
OC.Share.markFileAsShared($tr, true, hasLink);
- if ((permissions & OC.PERMISSION_SHARE) === 0) {
+ if ((permissions & OC.PERMISSION_SHARE) === 0 && $tr.attr('data-share-owner')) {
// if no share action exists because the admin disabled sharing for this user
// we create a share notification action to inform the user about files
// shared with him otherwise we just update the existing share action.