summaryrefslogtreecommitdiff
path: root/scheduler
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-05-15 10:42:54 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-05-15 10:42:54 -0400
commite923f65f23d76f965c00e3e140e048d833c0ddf5 (patch)
tree544703b3ddbe549ec562cfa223a8fdf16a911e1e /scheduler
parentd1d3862ca2345215d5dd9e9299608d299efedfff (diff)
downloadcups-e923f65f23d76f965c00e3e140e048d833c0ddf5.tar.gz
Explain the "forbidden" error better (Issue #5547)
Diffstat (limited to 'scheduler')
-rw-r--r--scheduler/client.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/scheduler/client.c b/scheduler/client.c
index df146f4c2..923a6e67a 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;