From 8cbd5764dc499274a0fd2f97717dfa1de121788a Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 19 Jan 2012 21:47:09 +0000 Subject: Must allow roles to have '-' character --- lib/roles.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/roles.lua b/lib/roles.lua index 8cc5332..0cfd382 100644 --- a/lib/roles.lua +++ b/lib/roles.lua @@ -299,8 +299,8 @@ set_role_perm = function(self, role, permissions, permissions_array) if role==nil or role=="" then return false, "Invalid Role" end - if string.find(role, '[^%w_/]') then - return false, "Role can only contain letters, numbers, '/', and '_'" + if string.find(role, '[^%w_/-]') then + return false, "Role can only contain letters, numbers, '/', '-', and '_'" end if permissions and not permissions_array then permissions_array = {} -- cgit v1.2.3