Kaynağa Gözat

renaming group CLIENT to METASERVICE-CLIENT

ShariX Developer 1 gün önce
ebeveyn
işleme
676b5cbe6a

+ 3 - 3
lib/menu.py

@@ -6,9 +6,9 @@
 WSR_ALL = ['serivce_tariff_local']
 
 #TODO - providers+resources on map
-WSR_CLIENT_MY = ['order_local', 'orders_local', 'frequent_address', 'favorite_contacts', 'preferred_providers']
-WSR_MENU_CLIENT_MY_OPERATIONS = ['order_local/add']
-WSR_NOT_MENU_CLIENT_MY_OPERATIONS = ['order_local/edit', 'frequent_address/add', 'frequent_address/edit', 'frequent_address/del', 'favorite_contacts/add', 'favorite_contacts/edit', 'favorite_contacts/del', 'preferred_providers/add', 'preferred_providers/edit', 'preferred_providers/del']
+#WSR_CLIENT_MY = ['order_local', 'orders_local', 'frequent_address', 'favorite_contacts', 'preferred_providers']
+#WSR_MENU_CLIENT_MY_OPERATIONS = ['order_local/add']
+#WSR_NOT_MENU_CLIENT_MY_OPERATIONS = ['order_local/edit', 'frequent_address/add', 'frequent_address/edit', 'frequent_address/del', 'favorite_contacts/add', 'favorite_contacts/edit', 'favorite_contacts/del', 'preferred_providers/add', 'preferred_providers/edit', 'preferred_providers/del']
 
 #WEBSERVICE_RUNNING_MENU
 MENU_GLOBAL_CUSTOMIZABLE = ['main_local', 'service_tariffs_local']

+ 2 - 2
templates/webservice_running/main_local.html

@@ -8,7 +8,7 @@
     <a href="#" class="text-nowrap">Личный кабинет ShariX Platform</a>
 </p>
 
-{% if "CLIENT" in user_groups %}
+{% if "METASERVICE-CLIENT" in user_groups %}
     <div class="card mb-5">
         <div class="card-body d-flex justify-content-between align-items-center">
             <span>Баланс: 0 <i class="fa-solid fa-coins me-1"></i></span>
@@ -57,7 +57,7 @@
                 <li><a href="https://wiki.sharix-app.org/doku.php/sharix/legal/porjadok_okazanija_uslug">Пользовательское соглашение с партнерами</a></li>
             {% endif %}
 
-            {% if "CLIENT" in user_groups %}
+            {% if "METASERVICE-CLIENT" in user_groups %}
                 <li><a href="https://wiki.sharix-app.org/doku.php/sharix/legal/porjadok_okazanija_uslug">Договор на оказание услуг</a></li>
             {% endif %}
 

+ 3 - 3
views/order_local.py

@@ -82,7 +82,7 @@ class OrderLocalEditView(OrderEditView):
     page_name = 'order_local_edit'
 
     def test_func(self):
-        return "CLIENT" in self.user_groups
+        return "METASERVICE-CLIENT" in self.user_groups
 
     def form_valid(self, form):
         with transaction.atomic():
@@ -100,8 +100,8 @@ class OrderLocalCreateView(OrderCreateView):
     page_name = 'order_local/add/'
 
     def test_func(self):
-        return "CLIENT" in self.user_groups
-        #return not "CLIENT" in self.user_groups
+        return "METASERVICE-CLIENT" in self.user_groups
+        #return not "METASERVICE-CLIENT" in self.user_groups
 
     def form_valid(self, form):
         with transaction.atomic():