Require logging in before use of the sql edit popup
authorKarl O. Pinc <kop@karlpinc.com>
Fri, 13 Sep 2024 18:24:08 +0000 (13:24 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Fri, 13 Sep 2024 18:24:08 +0000 (13:24 -0500)
src/pgwui_sql/templates/sql_edit.mak

index 4e7d6c6dbf054aef185a15998a467bcdbb9adb84..c2f229ddf244f3b2eddb42e517b9b52ed3af7b2f 100644 (file)
   <% tab_index.inc() %>
 </%def>
 
-<% tab_index = self.attr.TabIndex() %>
-${self.main_form(tab_index, target=self.sql_results_target(),
-                 action=request.route_path('pgwui_sql'))}
+% if havecreds:
+    <% tab_index = self.attr.TabIndex() %>
+    ${self.main_form(tab_index, target=self.sql_results_target(),
+                     action=request.route_path('pgwui_sql'))}
+% else:
+    <p>Not logged in.  Close this window and re-open it after logging in.</p>
+% endif