From: Michael R Sweet Date: Wed, 15 May 2019 14:42:54 +0000 (-0400) Subject: Explain the "forbidden" error better (Issue #5547) X-Git-Tag: v2.3rc1~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e923f65f23d76f965c00e3e140e048d833c0ddf5;p=thirdparty%2Fcups.git Explain the "forbidden" error better (Issue #5547) --- diff --git a/CHANGES.md b/CHANGES.md index aabae66f89..fdaec6d2a0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Changes in CUPS v2.3rc1 - The `cupsctl` command now prevents setting "cups-files.conf" directives (Issue #5530) +- The "forbidden" message in the web interface is now explained (Issue #5547) - The footer in the web interface covered some content on small displays (Issue #5574) - The `ippeveprinter` command now looks for print commands in the "command" diff --git a/scheduler/client.c b/scheduler/client.c index df146f4c2e..923a6e67a2 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -1,7 +1,7 @@ /* * Client routines for the CUPS scheduler. * - * Copyright © 2007-2018 by Apple Inc. + * Copyright © 2007-2019 by Apple Inc. * Copyright © 1997-2007 by Easy Software Products, all rights reserved. * * This file contains Kerberos support code, copyright 2006 by @@ -1975,11 +1975,20 @@ cupsdSendError(cupsd_client_t *con, /* I - Connection */ redirect[0] = '\0'; if (code == HTTP_STATUS_UNAUTHORIZED) + { text = _cupsLangString(con->language, _("Enter your username and password or the " "root username and password to access this " "page. If you are using Kerberos authentication, " "make sure you have a valid Kerberos ticket.")); + } + else if (code == HTTP_STATUS_FORBIDDEN) + { + if (con->username[0]) + text = _cupsLangString(con->language, _("Your account does not have the necessary privileges.")); + else + text = _cupsLangString(con->language, _("You cannot access this page.")); + } else if (code == HTTP_STATUS_UPGRADE_REQUIRED) { text = urltext;