summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-11-17 15:51:17 +0000
committerTed Trask <ttrask01@yahoo.com>2013-11-17 15:51:17 +0000
commiteebbecf938ad35404b32d5cecaf5b3f3232e2514 (patch)
tree10d3e5ea8332ef8764c5897d6f67a171182616df
parent01e6d7c9e350d72eaaa8e1270864df7332668543 (diff)
downloadacf-freeswitch-vmail-eebbecf938ad35404b32d5cecaf5b3f3232e2514.tar.bz2
acf-freeswitch-vmail-eebbecf938ad35404b32d5cecaf5b3f3232e2514.tar.xz
Clean up authenticator to properly report fields
-rw-r--r--authenticator-freeswitch-vmail.lua19
1 files changed, 16 insertions, 3 deletions
diff --git a/authenticator-freeswitch-vmail.lua b/authenticator-freeswitch-vmail.lua
index 14c3f2f..e4072a6 100644
--- a/authenticator-freeswitch-vmail.lua
+++ b/authenticator-freeswitch-vmail.lua
@@ -1,21 +1,33 @@
--- Copy of authenticator-plaintext, plus added authentication from voicemail DB
+-- Authentication from voicemail DB
local mymodule = {}
authenticator = require("authenticator")
md5 = require("md5")
+-- We will not list entries from the voicemail database, as you must use the freeswitch-vmail controller
+-- to list/view/edit entries. Similarly, we will not allow deletion. We will only allow reading single
+-- entries, as is done during authentication. These entries will be specified for table=authenticator.usertable
+-- and field="". Roles and home page are hardcoded below.
+
mymodule.list_fields = function(self, tabl)
- return nil
+ if tabl==authenticator.usertable then
+ return {""}
+ else
+ return {}
+ end
end
+-- Do not list entries from vmail, must use vmail controller to view/edit
mymodule.read_field = function(self, tabl, field)
- return nil
+ return {}
end
+-- We do not allow deletion
mymodule.delete_field = function(self, tabl, field)
return false
end
+-- We do not allow writing
mymodule.write_entry = function(self, tabl, field, id, entry)
return false
end
@@ -34,6 +46,7 @@ mymodule.read_entry = function(self, tabl, field, id)
return result
end
+-- We do not allow deletion
mymodule.delete_entry = function (self, tabl, field, id)
return false
end