diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-08-16 15:21:41 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-08-16 15:21:41 +0000 |
commit | 29de360eb486521a4e65d6e1452a8c623201c945 (patch) | |
tree | 9dc5a39aa85b0a9a5a211d43b104633d35b51d87 /lib/authenticator.lua | |
parent | e552a644c3930f4bffe2ff17c331c0a035d02531 (diff) | |
download | acf-core-29de360eb486521a4e65d6e1452a8c623201c945.tar.bz2 acf-core-29de360eb486521a4e65d6e1452a8c623201c945.tar.xz |
Modified roles and authenticator to delete all data fields when deleting a role or user. Modified all roles code to pass self for future move from text file to database. Roles cannot use authenticator unless or until roles file syntax is changed.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1382 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/authenticator.lua')
-rw-r--r-- | lib/authenticator.lua | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/authenticator.lua b/lib/authenticator.lua index 4af5e45..857703c 100644 --- a/lib/authenticator.lua +++ b/lib/authenticator.lua @@ -170,7 +170,7 @@ get_userinfo_roles = function(self, userid) end local rol = require("roles") if rol then - local avail_roles = rol.list_all_roles() + local avail_roles = rol.list_all_roles(self) for x,role in ipairs(avail_roles) do if role=="ALL" then table.remove(avail_roles,x) @@ -251,6 +251,14 @@ delete_user = function (self, userid) return cfe({ value=cmdresult, label="Delete user result" }) end +list_userfields = function(self) + load_auth(self) + if auth then + return auth.list_fields(self, passwdtable) + end + return nil +end + read_userfield = function(self, name) load_auth(self) if auth and name ~= "" then @@ -291,6 +299,14 @@ delete_userentry = function (self, name, userid) return false end +list_rolefields = function(self) + load_auth(self) + if auth then + return auth.list_fields(self, roletable) + end + return nil +end + read_rolefield = function(self, name) load_auth(self) if auth then |