summaryrefslogtreecommitdiffstats
path: root/openssh-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'openssh-controller.lua')
-rw-r--r--openssh-controller.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/openssh-controller.lua b/openssh-controller.lua
index 6a76512..2ebf0da 100644
--- a/openssh-controller.lua
+++ b/openssh-controller.lua
@@ -24,3 +24,19 @@ end
function connectedpeers(self)
return self.model.list_conn_peers()
end
+
+function listusers(self)
+ return self.model.list_users()
+end
+
+function listauth(self)
+ return self.model.list_auths(self.clientdata.user)
+end
+
+function deleteauth(self)
+ return self:redirect_to_referrer(self.model.delete_auth(self.clientdata.user, self.clientdata.auth))
+end
+
+function addauth(self)
+ return controllerfunctions.handle_form(self, function() return self.model.get_auth(self.clientdata.user) end, self.model.create_auth, self.clientdata, "Add", "Add New Authorized Key", "Key Added")
+end