summaryrefslogtreecommitdiffstats
path: root/app/acf-util
diff options
context:
space:
mode:
authorMike Mason <ms13sp@gmail.com>2008-02-04 21:07:39 +0000
committerMike Mason <ms13sp@gmail.com>2008-02-04 21:07:39 +0000
commit3857fee1017e8dec164faa13a0ca01828b4d50f6 (patch)
tree6c5ca2101122aeaf61e18c865d4fa91eaa902a71 /app/acf-util
parent30e76e234af48b3c42e1e22eae2ebb25dd3625f6 (diff)
downloadacf-core-3857fee1017e8dec164faa13a0ca01828b4d50f6.tar.bz2
acf-core-3857fee1017e8dec164faa13a0ca01828b4d50f6.tar.xz
Adding the beingings of the authorization items. Also adding some of the updates to the Autentication.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@689 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'app/acf-util')
-rw-r--r--app/acf-util/roles-controller.lua20
-rw-r--r--app/acf-util/roles-getlist-html.lsp7
-rw-r--r--app/acf-util/roles-model.lua25
-rw-r--r--app/acf-util/roles-read-html.lsp8
4 files changed, 60 insertions, 0 deletions
diff --git a/app/acf-util/roles-controller.lua b/app/acf-util/roles-controller.lua
new file mode 100644
index 0000000..b8fa7f4
--- /dev/null
+++ b/app/acf-util/roles-controller.lua
@@ -0,0 +1,20 @@
+-- Roles/Group functions
+
+module (..., package.seeall)
+
+--require ("session")
+
+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
+ --logit ("logon.mvc.on_load activated")
+ end
+
+read = function(self)
+ return( {read= self.model:read(clientdata.sessionid)})
+end
+
+getlist = function(self)
+ return( { contlist = self.model:getcont(self)})
+end
diff --git a/app/acf-util/roles-getlist-html.lsp b/app/acf-util/roles-getlist-html.lsp
new file mode 100644
index 0000000..48c2aba
--- /dev/null
+++ b/app/acf-util/roles-getlist-html.lsp
@@ -0,0 +1,7 @@
+<? local view= ... ?>
+<h1>Controller Status</h1>
+<? for a,b in pairs(view.contlist.value) do
+print("<b>",a,"</b>")
+for k,v in pairs(b) do print(v) end
+print("<br>")
+end ?>
diff --git a/app/acf-util/roles-model.lua b/app/acf-util/roles-model.lua
new file mode 100644
index 0000000..dbfff35
--- /dev/null
+++ b/app/acf-util/roles-model.lua
@@ -0,0 +1,25 @@
+-- Roles/Group model functions
+
+require ("session")
+require ("roles")
+
+module (..., package.seeall)
+
+read = function(self,sessionid)
+ useid , theroles = session.check_session(conf.sessiondir,sessionid,"roles")
+ return ( cfe { value=theroles,name="roles" })
+end
+
+getcont = function(self)
+ --need to get a list of all the controllers
+ --t = roles.get_controllers(self,"skins")
+ bobo = roles.get_controllers(self)
+ local table_m = {}
+ for a,b in pairs(bobo) do
+ temp = roles.get_controllers_func(self,b)
+ table_m[b.sname] = temp
+ end
+
+ return (cfe {value=table_m,name="mtable"})
+
+end
diff --git a/app/acf-util/roles-read-html.lsp b/app/acf-util/roles-read-html.lsp
new file mode 100644
index 0000000..ec6e965
--- /dev/null
+++ b/app/acf-util/roles-read-html.lsp
@@ -0,0 +1,8 @@
+<? local view= ... ?>
+<h1>Role Views</h1>
+<p>You are valid in these role <p>
+<? for a,b in pairs(view.read.value) do ?>
+<li><?= b ?><br>
+<? end ?>
+
+<?= html.cfe_unpack(view) ?>