diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-12-21 16:46:20 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-21 16:46:20 +0000 |
commit | 4ebeb9d3bc2f123f93338bcc8b15ef1723d4eb35 (patch) | |
tree | c6eeb6038a2dfb3b6dbbae2dbd96852e9653755c /app/acf-util/roles-model.lua | |
parent | b5b8c138deb5d4b4216c9186e3d528792edc70b2 (diff) | |
download | acf-core-4ebeb9d3bc2f123f93338bcc8b15ef1723d4eb35.tar.bz2 acf-core-4ebeb9d3bc2f123f93338bcc8b15ef1723d4eb35.tar.xz |
Modified permissions from controller:action to prefix/controller/action.
Had to move welcome to the acf-util prefix.
Changed format of roles files: old ACF format will still work, but authenticator format won't.
Diffstat (limited to 'app/acf-util/roles-model.lua')
-rw-r--r-- | app/acf-util/roles-model.lua | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/app/acf-util/roles-model.lua b/app/acf-util/roles-model.lua index 79c1b14..6b12dd9 100644 --- a/app/acf-util/roles-model.lua +++ b/app/acf-util/roles-model.lua @@ -11,19 +11,22 @@ local get_all_permissions = function(self) local table_perm = {} local array_perm = {} for a,b in pairs(controllers) do - if nil == table_perm[b.sname] then - table_perm[b.sname] = {} + if nil == table_perm[b.prefix] then + table_perm[b.prefix] = {} + end + if nil == table_perm[b.prefix][b.sname] then + table_perm[b.prefix][b.sname] = {} end local temp = roles.get_controllers_func(self,b) for x,y in ipairs(temp) do - table_perm[b.sname][y] = {} - array_perm[#array_perm + 1] = b.sname .. ":" .. y + table_perm[b.prefix][b.sname][y] = {} + array_perm[#array_perm + 1] = b.prefix .. b.sname .. "/" .. y end temp = roles.get_controllers_view(self,b) for x,y in ipairs(temp) do - if not table_perm[b.sname][y] then - table_perm[b.sname][y] = {} - array_perm[#array_perm + 1] = b.sname .. ":" .. y + if not table_perm[b.prefix][b.sname][y] then + table_perm[b.prefix][b.sname][y] = {} + array_perm[#array_perm + 1] = b.prefix .. b.sname .. "/" .. y end end end |