diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-01-19 21:47:09 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-01-21 15:52:36 +0000 |
commit | d91936b6bf21385cd319e66de44e80c88387f3bb (patch) | |
tree | 62bd882c043df7e4f340bed3e89381f77cc7483f /lib/roles.lua | |
parent | bdc921ce195b3037c8b2fe650e30f2e7bd979e81 (diff) | |
download | acf-core-d91936b6bf21385cd319e66de44e80c88387f3bb.tar.bz2 acf-core-d91936b6bf21385cd319e66de44e80c88387f3bb.tar.xz |
Must allow roles to have '-' character
(cherry picked from commit 8cbd5764dc499274a0fd2f97717dfa1de121788a)
Diffstat (limited to 'lib/roles.lua')
-rw-r--r-- | lib/roles.lua | 4 |
1 files 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 = {} |