From eb046ff591c5abe9f2cd1f493ab8756d0abf61cf Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 12 Apr 2014 04:08:02 +0000 Subject: Changes to use new htmlviewfunctions functions and change connectedpeers to return cfe --- openssh-listauth-html.lsp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'openssh-listauth-html.lsp') diff --git a/openssh-listauth-html.lsp b/openssh-listauth-html.lsp index 8d8ebad..d0b5e3e 100644 --- a/openssh-listauth-html.lsp +++ b/openssh-listauth-html.lsp @@ -23,7 +23,7 @@ <% htmlviewfunctions.displaycommandresults({"deleteauth"}, session) %> <% htmlviewfunctions.displaycommandresults({"addauth"}, session, true) %> -

Authorized Keys for <%= html.html_escape(view.value.user.value) %>

+<% local header_level = htmlviewfunctions.displaysectionstart(cfe({label="Authorized Keys for "..view.value.user.value}), page_info) %> @@ -31,14 +31,13 @@ +<% local user = cfe({ type="hidden", value=view.value.user.value }) %> +<% local authid = cfe({ type="hidden", value="" }) %> <% for i,auth in ipairs(view.value.auth.value) do %> @@ -46,5 +45,6 @@ <% end %>
ActionKey
-
" method="post"> - - - -
+ <% authid.value = auth.id %> + <% htmlviewfunctions.displayitem(cfe({type="form", value={user=user, auth=authid}, label="", option="Delete", action="deleteauth"}), page_info, -1) %>
<%= html.html_escape(auth.id) %> <% if #auth.key>32 then io.write(html.html_escape(string.sub(auth.key,0,16)) .. " ... " .. html.html_escape(string.sub(auth.key, -16))) else io.write(html.html_escape(auth.key)) end %>

In order to preserve keys with lbu, you must add /<% if view.value.user.value ~= "root" then io.write("home/") end %><%= view.value.user.value %>/.ssh/authorized_keys to lbu include +<% htmlviewfunctions.displaysectionend(header_level) %> <% viewlibrary.dispatch_component("addauth", {user=view.value.user.value}) %> -- cgit v1.2.3