From 488c8802a374a1b5ce6bb1708a15eb2c95dd5146 Mon Sep 17 00:00:00 2001 From: lian Date: Fri, 13 Apr 2018 13:27:05 +0800 Subject: [PATCH] update multi storages backend 1. use $.isEmptyObject() check if app.pageOptions.storages is empty 2. return [] if no storage_ids setting for user role --- seahub/templates/js/templates.html | 6 ++++-- seahub/utils/repo.py | 2 +- static/scripts/app/views/add-group-repo.js | 1 - static/scripts/app/views/create-pub-repo.js | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/seahub/templates/js/templates.html b/seahub/templates/js/templates.html index bea5a0ea53..9c0171c850 100644 --- a/seahub/templates/js/templates.html +++ b/seahub/templates/js/templates.html @@ -13,6 +13,7 @@
<% } %> + <% if (!$.isEmptyObject(app.pageOptions.storages)) { %> <% if (app.pageOptions.storages.length > 1) { %>

<% } %> + <% } %> <% if (showSharePerm) { %>