diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-07-25 19:00:03 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-07-25 19:00:03 +0000 |
commit | 4bf00bc98b36c0233e1ea833571acffefe2ec73b (patch) | |
tree | 13379b4d21cedc5a3137a508db94e3e243d3d6de /lib/authenticator.lua | |
parent | 0b933c7c8b5daf0fd62d9f9dfef973b8383250f1 (diff) | |
download | acf-core-4bf00bc98b36c0233e1ea833571acffefe2ec73b.tar.bz2 acf-core-4bf00bc98b36c0233e1ea833571acffefe2ec73b.tar.xz |
Modified authenticator to allow reading/writing role-based options. Modified viewfunctions to display multi values that are not in options.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1320 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/authenticator.lua')
-rw-r--r-- | lib/authenticator.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/authenticator.lua b/lib/authenticator.lua index 3438c19..4af5e45 100644 --- a/lib/authenticator.lua +++ b/lib/authenticator.lua @@ -19,6 +19,7 @@ local availablefields = { ['roles']=true, } local passwdtable = "passwd" +local roletable = "roles" local load_auth = function(self) -- For now, just loads the plaintext version @@ -289,3 +290,43 @@ delete_userentry = function (self, name, userid) end return false end + +read_rolefield = function(self, name) + load_auth(self) + if auth then + return auth.read_field(self, roletable, name) + end + return nil +end + +delete_rolefield = function(self, name) + load_auth(self) + if auth then + return auth.delete_field(self, roletable, name) + end + return false +end + +write_roleentry = function(self, name, role, entry) + load_auth(self) + if auth then + return auth.write_entry(self, roletable, name, role, entry) + end + return false +end + +read_roleentry = function(self, name, role) + load_auth(self) + if auth then + return auth.read_entry(self, roletable, name, role) + end + return nil +end + +delete_roleentry = function (self, name, role) + load_auth(self) + if auth then + return auth.delete_entry(self, roletable, name, role) + end + return false +end |