Skip to content

Commit

Permalink
Explain the "forbidden" error better (Issue #5547)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed May 15, 2019
1 parent d1d3862 commit e923f65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 10 additions & 1 deletion scheduler/client.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e923f65

Please sign in to comment.