summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-02-18 19:52:34 +0000
committerMika Havela <mika.havela@gmail.com>2008-02-18 19:52:34 +0000
commit05ba1c56a685c78f86bc634b5de9bc66057ad386 (patch)
treea00400e5f39eb8ed09f4d53659371a70186672ca
parent867179d46067f0861bb53d4c99a3fe461f7015d6 (diff)
downloadacf-alpine-baselayout-05ba1c56a685c78f86bc634b5de9bc66057ad386.tar.bz2
acf-alpine-baselayout-05ba1c56a685c78f86bc634b5de9bc66057ad386.tar.xz
Moved password-manager to core
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@750 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rwxr-xr-xtmppassword-controller.lua47
-rwxr-xr-xtmppassword-edit-html.lsp72
-rwxr-xr-xtmppassword-read-html.lsp2
-rwxr-xr-xtmppassword-status-html.lsp82
-rwxr-xr-xtmppassword.menu3
5 files changed, 0 insertions, 206 deletions
diff --git a/tmppassword-controller.lua b/tmppassword-controller.lua
deleted file mode 100755
index c19d6b4..0000000
--- a/tmppassword-controller.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-module(..., package.seeall)
-
-local list_redir = function (self)
- self.conf.action = "status"
- self.conf.type = "redir"
- error (self.conf)
-end
-
-mvc = {}
-mvc.on_load = function(self, parent)
- if (self.worker[self.conf.action] == nil ) or ( self.conf.action == "init" ) then
- self.worker[self.conf.action] = list_redir(self)
- end
-end
-
-function status(self)
- local status=self.model.getstatus(self)
- status.cmdnew = cfe ({
- name="cmdnew",
- type="submit",
- label="Create new account",
- value="Create",
- disabled="yes",
- })
- return { status=status }
-end
-
-function edit(self)
- local config=self.model.getsettings(self.clientdata.userid)
- config.cmdsave = cfe ({
- name="cmdsave",
- type="submit",
- label="Save changes",
- value="Save",
- disabled="yes",
- })
- config.cmddelete = cfe ({
- name="cmddelete",
- type="submit",
- label="Delete this account",
- value="Delete",
- disabled="yes",
- })
-
- return { config=config, clientdata=self.clientdata }
-end
-
diff --git a/tmppassword-edit-html.lsp b/tmppassword-edit-html.lsp
deleted file mode 100755
index 8b295b5..0000000
--- a/tmppassword-edit-html.lsp
+++ /dev/null
@@ -1,72 +0,0 @@
-<? local form = ... ?>
-<?
---[[ DEBUG INFORMATION
-io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
-io.write(html.cfe_unpack(form))
-io.write("</span>")
---]]
-?>
-<?
-function displayinfo(myform,tags,viewonly)
- io.write("\n<DL>")
- for k,v in pairs(tags) do
- if (myform[v]) and (myform[v]["value"]) then
- local val = myform[v]
- io.write("\n\t<DT")
- if (#val.errtxt > 0) then
- val.class = "error"
- io.write(" class='error'")
- end
- io.write(">" .. val.label .. "</DT>\n")
- if (viewonly) then
- io.write("\t\t<DD>" .. val.value .. "\n")
- else
- io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n")
- end
- if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end
- io.write("\t\t</DD>\n")
- end
- end
- io.write("</DL>")
-end
-?>
-
-<H1>CONFIG</H1>
-<H2>Settings</H2>
-<?
-local myform = form.config
-local tags = { "userid", }
-displayinfo(myform,tags,"viewonly")
-local tags = { "descr", }
-displayinfo(myform,tags)
-?>
-
-<?
--- The following code is a bit special because I want to display checkboxes for available roles.
-local myform = form.config.roles
-io.write("\n<DL>")
-io.write("\n\t<DT")
-if (#myform.errtxt > 0) then
- myform.class = "error"
- io.write(" class='error'")
-end
-io.write(">" .. myform.label .. "</DT>")
-io.write("\n\t\t<DD>")
-for k,v in pairs(myform.option) do
- local checked = ""
- if (form.config.userid.roles[v]) then checked = "checked='yes'" end
- io.write("\n\t\t\t" ..v .. ":<input class='checkbox' type='checkbox' name='roles' value='' " .. checked .. "> ")
-end
-if (#myform.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(myform.errtxt, "\n", "<BR>") .. "</P>\n") end
-io.write("\n\t\t</DD>\n")
-io.write("</DL>")
-?>
-
-<H2>Actions</H2>
-<?
-local myform = form.config
-local tags = { "cmdsave", "cmddelete", }
-displayinfo(myform,tags)
-
-?>
-
diff --git a/tmppassword-read-html.lsp b/tmppassword-read-html.lsp
deleted file mode 100755
index 9ab91bf..0000000
--- a/tmppassword-read-html.lsp
+++ /dev/null
@@ -1,2 +0,0 @@
-<? local view = ... ?>
-<p>The local root password is <?= view.password.value ?></p>
diff --git a/tmppassword-status-html.lsp b/tmppassword-status-html.lsp
deleted file mode 100755
index 45bed4f..0000000
--- a/tmppassword-status-html.lsp
+++ /dev/null
@@ -1,82 +0,0 @@
-<? local form = ... ?>
-<?
---[[ DEBUG INFORMATION
-io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
-io.write(html.cfe_unpack(form))
-io.write("</span>")
---]]
-?>
-
-<?
-function displayinfo(myform,tags,viewonly)
- io.write("<DL>")
- for k,v in pairs(tags) do
- if (myform[v]) and (myform[v]["value"]) then
- local val = myform[v]
- io.write("\t<DT")
- if (#val.errtxt > 0) then
- val.class = "error"
- io.write(" class='error'")
- end
- io.write(">" .. val.label .. "</DT>\n")
- if (viewonly) then
- io.write("\t\t<DD>" .. val.value .. "\n")
- else
- io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n")
- end
- if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end
- if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end
- io.write("\t\t</DD>\n")
- end
- end
- io.write("</DL>")
-end
-?>
-
-<H1>USER ACCOUNTS</H1>
-<H2>Create new account</H2>
-<?
-local myform = form.status
-local tags = { "cmdnew", }
-displayinfo(myform,tags)
-?>
-
-<H2>Existing account</H2>
-<?
---function displayinfo(myform,tags,viewonly)
-local myform = form.status.users
-
-io.write("<DL>")
-if (type(myform) == "table") then
- for k,v in pairs(myform) do
- local myform = myform[k]
- io.write("\t<DT")
- if (#myform.errtxt > 0) then
- myform.class = "error"
- io.write(" class='error'")
- end
- io.write("><IMG SRC='/static/tango/16x16/apps/system-users.png' HEIGHT='16' WIDTH='16'> " .. myform.label .. "</DT>\n")
- io.write("\t\t<DD>\n\t\t<TABLE>")
- io.write("\n\t\t\t<TR>\n\t\t\t\t<TD><B>Account name:</B></TD>\n\t\t\t\t<TD WIDTH='90%'>" .. myform.value .. "</TD>\n\t\t\t</TR>")
- io.write("\n\t\t\t<TR>\n\t\t\t\t<TD><B>Description:</B></TD>\n\t\t\t\t<TD>" .. (myform.descr or "") .. "</TD>\n\t\t\t</TR>")
- io.write("\n\t\t\t<TR>\n\t\t\t\t<TD><B>Roles:</B></TD>\n\t\t\t\t<TD>")
- io.write(tostring(myform.roles))
- io.write("</TD>\n\t\t\t</TR>")
- io.write("\n\t\t\t<TR>\n\t\t\t\t<TD><B>Options:</B></TD>\n\t\t\t\t<TD>[<A HREF='edit?userid=".. myform.value .. "'>Edit this account</A>]</TD>\n\t\t\t</TR>")
- io.write("\n\t\t</TABLE>\n")
- if (#myform.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(myform.errtxt, "\n", "<BR>") .. "</P>\n") end
- io.write("\t\t</DD>\n")
- end
-end
-io.write("</DL>")
-?>
-
-
-<?
---[[ DEBUG INFORMATION
-io.write("<H1>DEBUGGING</H1><span style='color:red'><H2>DEBUG INFO: CFE</H2>")
-io.write(html.cfe_unpack(form))
-io.write("</span>")
---]]
-?>
-
diff --git a/tmppassword.menu b/tmppassword.menu
deleted file mode 100755
index 3965745..0000000
--- a/tmppassword.menu
+++ /dev/null
@@ -1,3 +0,0 @@
-#CAT GROUP/DESC TAB ACTION
-System 01Password Status status
-