]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Wire up support for CUPS_BEARER cookie in authentication, and add
authorMichael R Sweet <msweet@msweet.org>
Thu, 1 May 2025 19:21:19 +0000 (15:21 -0400)
committerMichael R Sweet <msweet@msweet.org>
Thu, 1 May 2025 19:21:19 +0000 (15:21 -0400)
REMOTE_USER (username/sub), REMOTE_NAME (real name), and REMOTE_EMAIL
(email address) environment variables that get copied from the JWT or
GECOS data.

16 files changed:
cgi-bin/home.c
doc/cups.css
scheduler/auth.c
scheduler/client.c
scheduler/colorman.c
templates/da/header.tmpl.in
templates/de/header.tmpl.in
templates/es/header.tmpl.in
templates/fr/header.tmpl.in
templates/header.tmpl.in
templates/ja/header.tmpl.in
templates/pl/header.tmpl.in
templates/pt_BR/header.tmpl.in
templates/ru/header.tmpl.in
templates/sv/header.tmpl.in
xcode/CUPS.xcodeproj/project.pbxproj

index c9cf49d7874de867c59650d6dba0c3a88a2a7ade..0067f66377b30f4877e9605acde5c00bbfe2e081 100644 (file)
@@ -81,5 +81,5 @@ do_dashboard(void)
 static void
 do_search(char *query)                 /* I - Search string */
 {
-
+  (void)query;
 }
index 455f735cd20a955c1043b38b658348c9fb1585ef..d6b277a9b3b2b368e615cfa50994945b5d06d6b2 100644 (file)
 }
 .cups-header form {
   display: block;
-  padding: 15px 30px !important;
+  margin: 0px 30px;
+  padding: 15px 0px !important;
+}
+.cups-header span.label {
+  color: #ccc;
+  display: block;
+  font-style: italic;
+  margin: 0px 30px;
+  padding: 15px 0px !important;
 }
 
 .cups-body {
index d6063bfc3adf9ca0575b8407a3b91a0ec5571692..6efafe47d9d9bf071ae745b883e0ac16cfb9608d 100644 (file)
@@ -317,6 +317,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
   int          type;                   /* Authentication type */
   const char   *authorization;         /* Pointer into Authorization string */
   char         *ptr,                   /* Pointer into string */
+               bearer[2048],           /* CUPS_BEARER cookie string */
                username[HTTP_MAX_VALUE],
                                        /* Username string */
                password[HTTP_MAX_VALUE];
@@ -350,6 +351,9 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
 
   authorization = httpGetField(con->http, HTTP_FIELD_AUTHORIZATION);
 
+  if (!*authorization && type == CUPSD_AUTH_BEARER && httpGetCookieValue(con->http, "CUPS_BEARER", bearer, sizeof(bearer)))
+    authorization = "Bearer COOKIE";
+
   username[0] = '\0';
   password[0] = '\0';
 
@@ -627,7 +631,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
       int              pamerr;         /* PAM error code */
       struct pam_conv  pamdata;        /* PAM conversation data */
       cupsd_authdata_t data;           /* Authentication data */
-
+      struct passwd    *userinfo;      /* User information */
 
       cupsCopyString(data.username, username, sizeof(data.username));
       cupsCopyString(data.password, password, sizeof(data.password));
@@ -685,6 +689,13 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
       }
 
       pam_end(pamh, PAM_SUCCESS);
+
+     /*
+      * Copy GECOS information, if available, to get the user's real name...
+      */
+
+      if ((userinfo = getpwnam(username)) != NULL && userinfo->pw_gecos)
+        cupsCopyString(con->realname, userinfo->pw_gecos, sizeof(con->realname));
 #else
       cupsdLogClient(con, CUPSD_LOG_ERROR, "No authentication support is available.");
       return;
@@ -707,6 +718,9 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
     while (isspace(*authorization & 255))
       authorization ++;
 
+    if (!strcmp(authorization, "COOKIE"))
+      authorization = bearer;          // Use the cookie value for authorization
+
     // Decode and validate the JWT...
     if ((jwt = cupsJWTImportString(authorization, CUPS_JWS_FORMAT_COMPACT)) == NULL)
     {
@@ -765,7 +779,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
                                        /* Output token for username */
     gss_name_t         client_name;    /* Client name */
 
-#  ifdef __APPLE__
+#  ifdef __APPLE__DISABLED // Remove DISABLED if ever this code is used for macOS installer
    /*
     * If the weak-linked GSSAPI/Kerberos library is not present, don't try
     * to use it...
@@ -776,7 +790,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
       cupsdLogClient(con, CUPSD_LOG_WARN, "GSSAPI/Kerberos authentication failed because the Kerberos framework is not present.");
       return;
     }
-#  endif /* __APPLE__ */
+#  endif /* __APPLE__DISABLED */
 
    /*
     * Find the start of the Kerberos input token...
@@ -915,6 +929,10 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
   */
 
   cupsCopyString(con->username, username, sizeof(con->username));
+
+  if (!con->realname[0])
+    cupsCopyString(con->realname, username, sizeof(con->realname));
+
   cupsCopyString(con->password, password, sizeof(con->password));
 }
 
index 8f89b0801ab9235ed81a283b7a16ac6febcdfcc0..469569839a161b520a8749d432417a498920d845 100644 (file)
@@ -3266,7 +3266,9 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
                lang[1024],             /* LANG environment variable */
                path_info[1024],        /* PATH_INFO environment variable */
                remote_addr[1024],      /* REMOTE_ADDR environment variable */
+               remote_email[1024],     /* REMOTE_EMAIL environment variable */
                remote_host[1024],      /* REMOTE_HOST environment variable */
+               remote_name[1024],      /* REMOTE_NAME ("real name") environment variable */
                remote_user[1024],      /* REMOTE_USER environment variable */
                script_filename[1024],  /* SCRIPT_FILENAME environment variable */
                script_name[1024],      /* SCRIPT_NAME environment variable */
@@ -3478,10 +3480,21 @@ pipe_command(cupsd_client_t *con,       /* I - Client connection */
   if (path_info[0])
     envp[envc ++] = path_info;
 
+  if (con->email[0])
+  {
+    snprintf(remote_email, sizeof(remote_email), "REMOTE_EMAIL=%s", con->email);
+    envp[envc ++] = remote_email;
+  }
+
+  if (con->realname[0])
+  {
+    snprintf(remote_name, sizeof(remote_name), "REMOTE_NAME=%s", con->realname);
+    envp[envc ++] = remote_name;
+  }
+
   if (con->username[0])
   {
     snprintf(remote_user, sizeof(remote_user), "REMOTE_USER=%s", con->username);
-
     envp[envc ++] = remote_user;
   }
 
index 5784c1c75bd0eb4e01ba72ad52d24b3961d691c5..cc9c30e0ab370cb119499d8841d220f0dbbf64c4 100644 (file)
@@ -360,12 +360,14 @@ apple_register_profiles(
   CFStringRef          dict_key;       /* Key in factory profile dictionary */
 
 
+#  ifdef __APPLE__DISABLED // Remove DISABLED if ever this code is used for macOS installer
  /*
   * Make sure ColorSync is available...
   */
 
   if (&ColorSyncRegisterDevice == NULL)
     return;
+#  endif // __APPLE__DISABLED
 
  /*
   * Try opening the PPD file for this printer...
index e2dd37138febf88d042c79fcfed92964fb99ed73..a824d611d1cf39b3a50c3de53cb68547a10a1fd9 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">Hjem</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">Hjem</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">Administration</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">Klasser</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">Hjælp</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Jobs</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Printere</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index 3a40093d3fc632c1c1cf1a373d64135aa8841a2c..2bb6a91f30a3a732d79a48543b1c2aa4c7e6d3f2 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">Startseite</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">Startseite</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">Verwaltung</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">Klassen</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">Hilfe</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Aufträge</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Drucker</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index e71ea9f3d1ce72ac14e78fa01342a1ed668c6bd9..b1e07a1344822f258a1ac0ef66fb7d21c5f789a1 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">Inicio</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">Inicio</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">Administraci&oacute;n</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">Clases</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">Ayuda</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Trabajos</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Impresoras</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index 9012cedbf409dea004b2c46a619b360dd1b76062..860b030c9ef665b9b53c456e7cb9a17052a703dc 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">Home</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">Home</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">Administration</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">Classes</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">Aide</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Tâches</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Imprimantes</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index c8423d0c9d3bfe87a3c40e4cc12384fb14cf6a1e..6808a4667a3563d72b40caa3881a51970bce668e 100644 (file)
@@ -36,7 +36,9 @@
        <li><a {SECTION=help?class="active" :}href="/help/">Help</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Jobs</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Printers</a></li>
-       {?ENV:CUPS_OAUTH_SERVER=?{?ENV:REMOTE_USER}:{?ENV:CUPS_OAUTH_USERNAME} <li class="right"><form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form></li>}
+       <li class="right">{?ENV:REMOTE_USER=?<i>Guest</i>:{ENV:REMOTE_USER}}
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
        <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
index 3513e538e68f785abf5c71de905c9b4e31225115..35a600af49562f063604d5d0e9730963f40f93f9 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">ホーム</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">ホーム</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">管理</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">クラス</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">ヘルプ</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">ジョブ</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">プリンター</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index 497a5c4d328cb80876db9eb62df8bf2a8191bf92..f45ce523affe7e34a2dd29ca01fcbe063df599de 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">Start</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">Start</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">Administracja</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">Klasy</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">Pomoc</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Kolejka</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Drukarki</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index e9027427d5130d69f47e6c346726d3baed2242d1..51332bd3b9d7facdd94aa82b10c532904d2910b9 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">In&iacute;cio</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">In&iacute;cio</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">Administração</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">Classes</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">Ajuda</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Trabalhos</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Impressoras</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index ccb9d9d9a455318ff56665e794e703c45a922748..ce208d79cce77a248981a06a3064b75353fd79b9 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">Начало</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">Начало</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">Администрирование</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">Группы</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">Справка</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Задания</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Принтеры</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index 2ef0b70fd780bcdf663a2d6a5ba532b5b32fa2e2..e4a62eee8354cee0e90f959475815b60bbc8fc83 100644 (file)
        }
       }
     --></SCRIPT>
-    <title>{title} - CUPS @CUPS_VERSION@</title>
+    <title>{title} - {ENV:CUPS_VERSION}</title>
   </head>
   <body onload="check_cookies();">
     <div class="cups-header">
       <ul>
        <li><a class="img" href="https://openprinting.github.io/cups/" target="_blank"><img src="/images/cups.png" width="32" height="32" alt="OpenPrinting CUPS"></a></li>
-       <li><a href="/">Hem</a></li>
+       <li><a {SECTION=home?class="active" :}href="/">Hem</a></li>
        <li><a {SECTION=admin?class="active" :}href="/admin">Administration</a></li>
        <li><a {SECTION=classes?class="active" :}href="/classes/">Klasser</a></li>
        <li><a {SECTION=help?class="active" :}href="/help/">Hjälp</a></li>
        <li><a {SECTION=jobs?class="active" :}href="/jobs/">Jobb</a></li>
        <li><a {SECTION=printers?class="active" :}href="/printers/">Skrivare</a></li>
+       <li class="right"><span class="label">{?ENV:REMOTE_NAME=?Guest:{ENV:REMOTE_NAME}}</span>
+       {?ENV:CUPS_OAUTH_SERVER=?:<form action="/loginout/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="submit" value="{?ENV:CUPS_OAUTH_USERNAME=?Login:Logout}"></form>}
+       </li>
+       <li class="right"><form action="/help/" method="POST"><input type="hidden" name="org.cups.sid" value="{$org.cups.sid}"><input type="search" name="QUERY" value="{?QUERY}" size="10" placeholder="" autosave="org.cups.help" results="20"><input type="submit" value="Search"></form></li>
       </ul>
     </div>
     <div class="cups-body">
index 81467535a3658a89272cc0842725b667ff96f941..4571f87a2b8ecc1c9b5feaba73941b278610eb1d 100644 (file)
                        isa = PBXProject;
                        attributes = {
                                BuildIndependentTargetsInParallel = YES;
-                               LastUpgradeCheck = 1540;
+                               LastUpgradeCheck = 1600;
                                ORGANIZATIONNAME = "Apple Inc.";
                                TargetAttributes = {
                                        270695FD1CADF3E200FFE5FB = {
                                GCC_WARN_UNDECLARED_SELECTOR = YES;
                                GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
                                INSTALL_PATH = /usr/sbin;
-                               MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+                               MACOSX_DEPLOYMENT_TARGET = 11.0;
                                MTL_ENABLE_DEBUG_INFO = YES;
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                SDKROOT = macosx;
                                GCC_WARN_UNDECLARED_SELECTOR = YES;
                                GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
                                INSTALL_PATH = /usr/sbin;
-                               MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
+                               MACOSX_DEPLOYMENT_TARGET = 11.0;
                                MTL_ENABLE_DEBUG_INFO = NO;
                                PRODUCT_NAME = "$(TARGET_NAME)";
                                SDKROOT = macosx;