From 81b96b65128f6d3fbca3330f3a89c17887a0a1ed Mon Sep 17 00:00:00 2001
From: catborise <catborise@gmail.com>
Date: Tue, 13 Feb 2024 14:24:38 +0300
Subject: [PATCH] fix listing vms for normal users

---
 instances/templates/allinstances.html               | 10 ++++------
 instances/templates/allinstances_index_grouped.html |  2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/instances/templates/allinstances.html b/instances/templates/allinstances.html
index d1f0b28..9f10e1f 100644
--- a/instances/templates/allinstances.html
+++ b/instances/templates/allinstances.html
@@ -24,12 +24,10 @@
         {% endif %}
     {% endfor %}
     <div class="col-lg-12">
-        {% if 'instances.view_instances' in perms %}
-            {% if app_settings.VIEW_INSTANCES_LIST_STYLE == 'grouped' and request.user.is_superuser %}
-                {% include 'allinstances_index_grouped.html' %}
-            {% else %}
-                {% include 'allinstances_index_nongrouped.html' %}
-            {% endif %}
+        {% if app_settings.VIEW_INSTANCES_LIST_STYLE == 'grouped' and request.user.is_superuser %}
+            {% include 'allinstances_index_grouped.html' %}
+        {% else %}
+            {% include 'allinstances_index_nongrouped.html' %}
         {% endif %}
     </div>
 {% endblock content %}
diff --git a/instances/templates/allinstances_index_grouped.html b/instances/templates/allinstances_index_grouped.html
index e67ad93..290abe0 100644
--- a/instances/templates/allinstances_index_grouped.html
+++ b/instances/templates/allinstances_index_grouped.html
@@ -98,7 +98,7 @@ function hide_host_instances(host) {
     var rows = $('table tr');
     host_rows = rows.filter("[host='"+host+"']");
     host_rows.toggle();
-    $("span[id='collapse_host_instances_"+host+"']").toggleClass("bi-chevron-down ").toggleClass("bi-chevron-up");
+    $("span[id='collapse_host_instances_"+host+"']").toggleClass("bi bi-chevron-down ").toggleClass("bi bi-chevron-up");
     $("span[id='inst_count_badge_"+host+"']").toggleClass("d-none");
 }
 </script>