diff options
Diffstat (limited to 'openssh-listauth-html.lsp')
-rw-r--r-- | openssh-listauth-html.lsp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/openssh-listauth-html.lsp b/openssh-listauth-html.lsp new file mode 100644 index 0000000..f54a08a --- /dev/null +++ b/openssh-listauth-html.lsp @@ -0,0 +1,25 @@ +<% local view, viewlibrary, page_info, session = ... %> +<% require("viewfunctions") %> + +<% displaycommandresults({"deleteauth"}, session) %> +<% displaycommandresults({"addauth"}, session, true) %> + +<H1>Authorized Keys for <%= view.value.user.value %></H1> +<DL><TABLE> + <TR style="background:#eee;font-weight:bold;"> + <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">Action</TD> + <TD style="padding-right:20px;white-space:nowrap;text-align:left;" class="header">ID</TD> + <TD style="white-space:nowrap;text-align:left;" class="header">Key</TD> + </TR> +<% for i,auth in ipairs(view.value.auth.value) do %> + <TR> + <TD style="padding-right:20px;white-space:nowrap;"> + <%= html.link{value=page_info.script..page_info.prefix..page_info.controller.."/deleteauth?user="..view.value.user.value.."&auth="..auth.id, label="Delete "} %> + </TD> + <TD style="padding-right:20px;white-space:nowrap;"><%= auth.id %></TD> + <TD style="white-space:nowrap;"><% if #auth.key>32 then io.write(string.sub(auth.key,0,16) .. " ... " .. string.sub(auth.key, -16)) else io.write(auth.key) end %></TD> + </TR> +<% end %> +</TABLE></DL> + +<% viewlibrary.dispatch_component("addauth", {user=view.value.user.value}) %> |