diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-12-23 16:51:17 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-23 16:51:17 +0000 |
commit | 17ecdf3680593a739bf32186e8ca1a0dcaf9ea10 (patch) | |
tree | bea1fda559cef53cc3a524f656ca6fdf52302b7c /app/acf_www-controller.lua | |
parent | da8d6a71739aa6e1eff39a099893b33b1ad51569 (diff) | |
download | acf-core-17ecdf3680593a739bf32186e8ca1a0dcaf9ea10.tar.bz2 acf-core-17ecdf3680593a739bf32186e8ca1a0dcaf9ea10.tar.xz |
Modified menus to allow multiple controllers to use same menu group.
Also, allow for symlinks when searching for menu files. Slight cleanup of roles.
Diffstat (limited to 'app/acf_www-controller.lua')
-rw-r--r-- | app/acf_www-controller.lua | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua index 12a7a43..ee7f344 100644 --- a/app/acf_www-controller.lua +++ b/app/acf_www-controller.lua @@ -34,19 +34,15 @@ local function build_menus(self) local cat = cats[x] for y = #cat.groups,1,-1 do local group = cat.groups[y] - if nil == permissions[group.prefix] or nil == permissions[group.prefix][group.controller] then - table.remove(cat.groups, y) - else - for z = #group.tabs,1,-1 do - local tab = group.tabs[z] - if nil == permissions[group.prefix][group.controller][tab.action] then - table.remove(group.tabs, z) - end - end - if 0 == #group.tabs then - table.remove(cat.groups, y) + for z = #group.tabs,1,-1 do + local tab = group.tabs[z] + if nil == permissions[tab.prefix] or nil == permissions[tab.prefix][tab.controller] or nil == permissions[tab.prefix][tab.controller][tab.action] then + table.remove(group.tabs, z) end end + if 0 == #group.tabs then + table.remove(cat.groups, y) + end end if 0 == #cat.groups then table.remove(cats, x) |