Skip to content

Commit

Permalink
Updated auth failure to have a link
Browse files Browse the repository at this point in the history
  • Loading branch information
gian committed Apr 18, 2011
1 parent 480bde2 commit 9a79d1f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions step7/auth.ur
Expand Up @@ -31,10 +31,16 @@ fun loginHandler row =
fun displayIfAuthenticated page =
c <- getCookie userSession;
case c of
None => error <xml>Not logged in</xml>
None => return
<xml><head/>
<body>
<h1>Not logged in.</h1>
<p><a link={login()}>Login</a></p>
</body>
</xml>
| Some c' => ifAuthenticated page c'

fun login () = return
and login () = return
<xml>
<head><title>Login to UrBlog</title></head>
<body>
Expand Down

0 comments on commit 9a79d1f

Please sign in to comment.