diff options
author | Derrell Lipman <derrell@samba.org> | 2007-01-03 19:57:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:36:06 -0500 |
commit | 2e7c59c24470766e37309c7a8bfa4c7b81c57614 (patch) | |
tree | c44c89911868c52f25ca66bdefa68e13248db8e6 /webapps/login.esp | |
parent | 57f5bf78fa9fc9d190c3cb25251e686a1488f790 (diff) | |
download | samba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.tar.gz samba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.tar.bz2 samba-2e7c59c24470766e37309c7a8bfa4c7b81c57614.zip |
r20515: Continued work on the Web Application Framework. Until we get all of the
functionality of the old scripts incorporated into the new framework, the old
scripts need to still be available. I've reverted to having the old scripts
be the default pages, and added an option to access the preview of the new
SWAT.
(This used to be commit b43620d4b8eff815f4a6dc02522a8dfc9fdcaef4)
Diffstat (limited to 'webapps/login.esp')
-rw-r--r-- | webapps/login.esp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/webapps/login.esp b/webapps/login.esp deleted file mode 100644 index ffbeee8d5e..0000000000 --- a/webapps/login.esp +++ /dev/null @@ -1,59 +0,0 @@ -<% page_header("plain", "Samba WEB Application Login", ""); - libinclude("auth.js"); - include("/scripting/forms.js"); - -if (request['SESSION_EXPIRED'] == "True") { - write("<b>Your session has expired - please authenticate again<br /></b>\n"); -} - -var f = FormObj("login", 3, 1); -f.element[0].label = "Username"; -f.element[0].value = form['Username']; -f.element[1].label = "Password"; -f.element[1].value = form['Password']; -f.element[1].type = "password"; -f.element[2].label = "Domain"; -f.element[2].type = "select"; -f.element[2].list = getDomainList(); -f.submit[0] = "Login"; - -f.display(); -%> - -<% - if (request.REQUEST_METHOD == "POST") { - var creds = credentials_init(); - creds.set_username(form.Username); - creds.set_password(form.Password); - creds.set_domain(form.Domain); - creds.set_workstation(request['REMOTE_HOST']); - - auth = userAuth(creds, request['REMOTE_SOCKET_ADDRESS']); - if (auth == undefined) { - write("<b>Invalid login - please try again<br /></b>\n"); - } else if (auth.result) { - session.AUTHENTICATED = true; - session.authinfo = new Object(); - - session.authinfo.username = auth.username; - session.authinfo.domain = auth.domain; - session.authinfo.credentials = creds; - session.authinfo.session_info = auth.session_info; - - /* if the user was asking for the login page, then now - redirect them to the main page. Otherwise just - redirect them to the current page, which will now - show its true content */ - if (request.REQUEST_URI == "/login.esp") { - redirect(session_uri("/")); - } else { - redirect(session_uri(request.REQUEST_URI)); - } - } else if (auth.report == undefined) { - write("<b>Login failed - please try again<br /></b>\n"); - } else { - write("<b>Login failed: " + auth.report + " - please try again<br /></b>\n"); - } - } -%> -<% page_footer(); %> |