From 29de360eb486521a4e65d6e1452a8c623201c945 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 16 Aug 2008 15:21:41 +0000 Subject: 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 --- lib/authenticator.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/authenticator.lua') 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 -- cgit v1.2.3