diff options
author | rcritten@redhat.com <rcritten@redhat.com> | 2007-09-21 10:58:40 -0400 |
---|---|---|
committer | rcritten@redhat.com <rcritten@redhat.com> | 2007-09-21 10:58:40 -0400 |
commit | 919d037189cd3134d3eb4ba07b5ce131f018936f (patch) | |
tree | db5c7562aeeb2b936c2d06cfde1374960c3839b5 /ipa-server | |
parent | e41bb1d6fe41efdf591ea6addde4ceb22e389178 (diff) | |
download | freeipa-919d037189cd3134d3eb4ba07b5ce131f018936f.tar.gz freeipa-919d037189cd3134d3eb4ba07b5ce131f018936f.tar.xz freeipa-919d037189cd3134d3eb4ba07b5ce131f018936f.zip |
Add a failed login page. In theory it should never been seen but it makes
things nicer
Remove the login page
Remove the login link from master.kid
Diffstat (limited to 'ipa-server')
-rw-r--r-- | ipa-server/ipa-gui/dev.cfg | 1 | ||||
-rw-r--r-- | ipa-server/ipa-gui/ipagui/controllers.py | 4 | ||||
-rw-r--r-- | ipa-server/ipa-gui/ipagui/templates/login.kid | 112 | ||||
-rw-r--r-- | ipa-server/ipa-gui/ipagui/templates/loginfailed.kid | 35 | ||||
-rw-r--r-- | ipa-server/ipa-gui/ipagui/templates/master.kid | 2 |
5 files changed, 41 insertions, 113 deletions
diff --git a/ipa-server/ipa-gui/dev.cfg b/ipa-server/ipa-gui/dev.cfg index 7cc2441d0..ef5e98a62 100644 --- a/ipa-server/ipa-gui/dev.cfg +++ b/ipa-server/ipa-gui/dev.cfg @@ -24,6 +24,7 @@ identity.source = 'visit' # Turn on identity and visit (visit is required for identity) identity.on=True +identity.failure_url="/loginfailed" visit.on=True visit.manager='proxyvisit' diff --git a/ipa-server/ipa-gui/ipagui/controllers.py b/ipa-server/ipa-gui/ipagui/controllers.py index 75e448352..c1aa5e860 100644 --- a/ipa-server/ipa-gui/ipagui/controllers.py +++ b/ipa-server/ipa-gui/ipagui/controllers.py @@ -630,3 +630,7 @@ class Root(controllers.RootController): @identity.require(identity.not_anonymous()) def groupupdatevalidate(self, tg_errors=None, **kw): return tg_errors, kw + + @expose("ipagui.templates.loginfailed") + def loginfailed(self, **kw): + return dict() diff --git a/ipa-server/ipa-gui/ipagui/templates/login.kid b/ipa-server/ipa-gui/ipagui/templates/login.kid deleted file mode 100644 index a819cfc7a..000000000 --- a/ipa-server/ipa-gui/ipagui/templates/login.kid +++ /dev/null @@ -1,112 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:py="http://purl.org/kid/ns#"> - -<head> - <meta content="text/html; charset=UTF-8" - http-equiv="content-type" py:replace="''"/> - <title>Login</title> - <style type="text/css"> - #loginBox - { - width: 30%; - margin: auto; - margin-top: 10%; - padding-left: 10%; - padding-right: 10%; - padding-top: 5%; - padding-bottom: 5%; - font-family: verdana; - font-size: 10px; - background-color: #eee; - border: 2px solid #ccc; - } - - #loginBox h1 - { - font-size: 42px; - font-family: "Trebuchet MS"; - margin: 0; - color: #ddd; - } - - #loginBox p - { - position: relative; - top: -1.5em; - padding-left: 4em; - font-size: 12px; - margin: 0; - color: #666; - } - - #loginBox table - { - table-layout: fixed; - border-spacing: 0; - width: 100%; - } - - #loginBox td.label - { - width: 33%; - text-align: right; - } - - #loginBox td.field - { - width: 66%; - } - - #loginBox td.field input - { - width: 100%; - } - - #loginBox td.buttons - { - text-align: right; - } - - </style> -</head> - -<body> - <div id="loginBox"> - <h1>Login</h1> - <p>${message}</p> - <form action="${previous_url}" method="POST"> - <table> - <tr> - <td class="label"> - <label for="user_name">User Name:</label> - </td> - <td class="field"> - <input type="text" id="user_name" name="user_name"/> - </td> - </tr> - <tr> - <td class="label"> - <label for="password">Password:</label> - </td> - <td class="field"> - <input type="password" id="password" name="password"/> - </td> - </tr> - <tr> - <td colspan="2" class="buttons"> - <input type="submit" name="login" value="Login"/> - </td> - </tr> - </table> - - <input py:if="forward_url" type="hidden" name="forward_url" - value="${forward_url}"/> - - <input py:for="name,value in original_parameters.items()" - type="hidden" name="${name}" value="${value}"/> - </form> - </div> -</body> -</html> diff --git a/ipa-server/ipa-gui/ipagui/templates/loginfailed.kid b/ipa-server/ipa-gui/ipagui/templates/loginfailed.kid new file mode 100644 index 000000000..84896be5c --- /dev/null +++ b/ipa-server/ipa-gui/ipagui/templates/loginfailed.kid @@ -0,0 +1,35 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:py="http://purl.org/kid/ns#"> + +<head> + <meta content="text/html; charset=UTF-8" + http-equiv="content-type" py:replace="''"/> + <title>Login Failure</title> +</head> + +<body> + <div id="header"> + <div id="logo"> + <a href="${tg.url('/')}"><img + src="${tg.url('/static/images/logo.png')}" + border="0" alt="homepage" + /></a> + </div> + <div id="headerinfo"> + <div id="login"> + <div py:if="tg.config('identity.on') and not defined('logging_in')" id="page +Login"> + <span py:if="tg.identity.anonymous"> + Kerberos login failed. + </span> + <span py:if="not tg.identity.anonymous"> + Logged in as: ${tg.identity.user.display_name} + </span> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/ipa-server/ipa-gui/ipagui/templates/master.kid b/ipa-server/ipa-gui/ipagui/templates/master.kid index 2675d3c40..9715e3844 100644 --- a/ipa-server/ipa-gui/ipagui/templates/master.kid +++ b/ipa-server/ipa-gui/ipagui/templates/master.kid @@ -26,7 +26,7 @@ <div id="login"> <div py:if="tg.config('identity.on') and not defined('logging_in')" id="pageLogin"> <span py:if="tg.identity.anonymous"> - <a href="${tg.url('/login')}">Login</a> + Kerberos login failed. </span> <span py:if="not tg.identity.anonymous"> Logged in as: ${tg.identity.user.display_name} |