summaryrefslogtreecommitdiffstats
path: root/tinydns-listpermissions-html.lsp
diff options
context:
space:
mode:
Diffstat (limited to 'tinydns-listpermissions-html.lsp')
-rw-r--r--tinydns-listpermissions-html.lsp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tinydns-listpermissions-html.lsp b/tinydns-listpermissions-html.lsp
new file mode 100644
index 0000000..0fd235e
--- /dev/null
+++ b/tinydns-listpermissions-html.lsp
@@ -0,0 +1,17 @@
+<? local view, viewlibrary, page_info = ... ?>
+<? --[[
+ io.write(html.cfe_unpack(view))
+--]] ?>
+
+<H1><?= view.label ?></H1>
+
+<TABLE>
+<TR><TD CLASS='header'>User</TD><TD CLASS='header'>Permissions</TD>
+<? for i,user in ipairs(view.value) do ?>
+ <TR><TD><?= html.link{value=page_info.script .. page_info.prefix .. page_info.controller .. "/edituserpermissions?userid=" .. user.id, label=user.id} ?></TD><TD>
+ <? for y,allowed in pairs(user.allowed) do
+ print(allowed, "<BR>")
+ end ?>
+ <TD></TR>
+<? end ?>
+</TABLE>