summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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] = {}