diff options
author | Ted Trask <ttrask01@yahoo.com> | 2010-09-28 07:15:36 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2010-09-28 07:15:36 +0000 |
commit | b202af98292d6d7b5053e5a934b916153ce89af9 (patch) | |
tree | bd8a6e2a973d01317fbf462e13d98932fbed2822 /app/acf-util/roles-model.lua | |
parent | 09344bc273f7147a9f81168096d2f8bb3d0fdedc (diff) | |
download | acf-core-b202af98292d6d7b5053e5a934b916153ce89af9.tar.bz2 acf-core-b202af98292d6d7b5053e5a934b916153ce89af9.tar.xz |
Made major changes to authenticator and roles to improve efficiency.
Changed authenticator.lua to request individual users, rather than always loading everyone.
Modified get_userinfo and removed get_userinfo_roles and get_userinfo_skin to remove unnecessary cfe processing.
This was especially bad when retrieving the cfe options for skins and roles.
This does break the interface used by other modules like acf-tinydns.
Validation and cfe processing were moved into password-model, where they belong.
Added global variables to authenticator and roles libraries so they can reuse data that was already generated.
Modified logon-controller to only check for zero users if logon fails.
Diffstat (limited to 'app/acf-util/roles-model.lua')
-rw-r--r-- | app/acf-util/roles-model.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/acf-util/roles-model.lua b/app/acf-util/roles-model.lua index 6b12dd9..e12d49a 100644 --- a/app/acf-util/roles-model.lua +++ b/app/acf-util/roles-model.lua @@ -36,7 +36,8 @@ end -- Return roles/permissions for specified user get_user_roles = function(self, userid) - rls = cfe({ type="list", value=authenticator.get_userinfo_roles(self, userid).value, label="Roles" }) + local userinfo = authenticator.get_userinfo(self, userid) or {} + rls = cfe({ type="list", value=userinfo.roles or {}, label="Roles" }) permissions = cfe({ type="table", value=roles.get_roles_perm(self, rls.value), label="Permissions" }) return cfe({ type="group", value={roles=rls, permissions=permissions} }) end |