From 13c4b25ab45c2ab897140fbafa59eafb9cacf000 Mon Sep 17 00:00:00 2001 From: Mike Mason Date: Tue, 5 Feb 2008 21:35:03 +0000 Subject: Added the full roles to the sessiondata. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@696 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/authenticator-plaintext.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/authenticator-plaintext.lua') diff --git a/lib/authenticator-plaintext.lua b/lib/authenticator-plaintext.lua index 57bbf35..c9d5c42 100644 --- a/lib/authenticator-plaintext.lua +++ b/lib/authenticator-plaintext.lua @@ -94,3 +94,12 @@ get_userinfo = function ( self, userid ) end end +get_userinfo_roles = function (self, userid) + local t = pvt.parse_authfile(self.conf.confdir .. "/passwd") + if t == false then + return nil + else + temp = pvt.get_id (userid, t) + return temp.roles + end +end -- cgit v1.2.3