diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-08-09 15:13:07 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-08-09 15:13:07 +0000 |
commit | 29fa171ab5b048d9f74ef4c8c9ee0b7d62fc3aa3 (patch) | |
tree | 81049538404e1a35975a7a3c8b7f758a959624b2 /lib/roles.lua | |
parent | af43f4566cf43ab0a1a700685c0286840c124d0a (diff) | |
download | acf-core-29fa171ab5b048d9f74ef4c8c9ee0b7d62fc3aa3.tar.bz2 acf-core-29fa171ab5b048d9f74ef4c8c9ee0b7d62fc3aa3.tar.xz |
Modified roles to list views that don't have actions in the list of available permissions
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1374 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/roles.lua')
-rw-r--r-- | lib/roles.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/roles.lua b/lib/roles.lua index 201e2a9..b90ecea 100644 --- a/lib/roles.lua +++ b/lib/roles.lua @@ -63,7 +63,7 @@ get_controllers_func = function(self,controller_info) temp = require (controller_info.name) temp1 = {} for a,b in pairs(temp) do - local c = string.match(a,"mvc") or string.match(a,"^_") + local c = string.match(a,"^mvc") or string.match(a,"^_") if c == nil and type(temp[a])=="function" then temp1[#temp1 +1] = a end @@ -74,6 +74,15 @@ get_controllers_func = function(self,controller_info) end end +-- Find all views for a controller +get_controllers_view = function(self,controller_info) + local temp = {} + for file in fs.find(controller_info.sname.."%-[^%.]+%-html%.lsp", controller_info.path) do + temp[#temp + 1] = string.match(file, controller_info.sname.."%-([^%./]+)%-html%.lsp") + end + return temp +end + list_default_roles = function() return default_roles end |