summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@tetrasec.net>2008-11-11 18:07:55 +0000
committerNathan Angelacos <nangel@tetrasec.net>2008-11-11 18:07:55 +0000
commit23eb494b681b395f0ecbd1bafbd411c9d671779b (patch)
treeb18c529082a8f367a5700c2e89e0c26d1cc98920 /lib
parent963485457e18bf66223fb4e748c16269cc807a34 (diff)
downloadacf-core-23eb494b681b395f0ecbd1bafbd411c9d671779b.tar.bz2
acf-core-23eb494b681b395f0ecbd1bafbd411c9d671779b.tar.xz
Allow controllers to have digits in their names
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1591 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib')
-rw-r--r--lib/roles.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/roles.lua b/lib/roles.lua
index 29f3bdc..5754ac1 100644
--- a/lib/roles.lua
+++ b/lib/roles.lua
@@ -142,9 +142,9 @@ get_roles_perm = function(self,roles)
f = fs.read_file_as_array(file)
for y,line in pairs(f) do
if reverseroles[string.match(line,"^[%w_]+")] then
- temp = format.string_to_table(string.match(line,"[,%a_:]+$"),",")
+ temp = format.string_to_table(string.match(line,"[,%w_:]+$"),",")
for z,perm in pairs(temp) do
- local control,action = string.match(perm,"([%a_]+):([%a_]+)")
+ local control,action = string.match(perm,"([%w_]+):([%w_]+)")
if control then
if nil == permissions[control] then
permissions[control] = {}
@@ -165,7 +165,7 @@ get_roles_perm = function(self,roles)
if reverseroles[entry.id] then
temp = format.string_to_table(entry.entry, ",")
for z,perm in pairs(temp) do
- local control,action = string.match(perm,"([%a_]+):([%a_]+)")
+ local control,action = string.match(perm,"([%w_]+):([%w_]+)")
if control then
if nil == permissions[control] then
permissions[control] = {}
@@ -195,9 +195,9 @@ get_role_perm = function(self,role)
f = fs.read_file_as_array(file)
for y,line in pairs(f) do
if role == string.match(line,"^[%w_]+") then
- temp = format.string_to_table(string.match(line,"[,%a_:]+$"),",")
+ temp = format.string_to_table(string.match(line,"[,%w_:]+$"),",")
for z,perm in pairs(temp) do
- local control,action = string.match(perm,"([%a_]+):([%a_]+)")
+ local control,action = string.match(perm,"([%w_]+):([%w_]+)")
if control then
if nil == permissions[control] then
permissions[control] = {}
@@ -218,7 +218,7 @@ get_role_perm = function(self,role)
if entry then
temp = format.string_to_table(entry, ",")
for z,perm in pairs(temp) do
- local control,action = string.match(perm,"([%a_]+):([%a_]+)")
+ local control,action = string.match(perm,"([%w_]+):([%w_]+)")
if control then
if nil == permissions[control] then
permissions[control] = {}