Smoother navigation and restricted iconbar for guest mode
[citadel.git] / webcit / iconbar.c
index a8c7b69c5051737d3a668c9843aa0aada191605b..5519100dc0de27c93c19379621ab93395225ee1c 100644 (file)
@@ -197,12 +197,20 @@ void commit_iconbar(void) {
 }
 
 
+/*
+ * Display the icon bar as long as we have an active session,
+ * and either the user is logged in or the server allows guest mode.
+ */
 void tmplput_iconbar(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
        
-       if ((WCC != NULL) && (WCC->logged_in)) {
-         DoTemplate(HKEY("iconbar"), NULL, &NoCtx);
+        if (   (WCC != NULL)
+               && (    (WCC->logged_in)
+                       || (WCC->serv_info->serv_supports_guest)
+               )
+       ) {
+               DoTemplate(HKEY("iconbar"), NULL, &NoCtx);
        }
 }