diff options
author | Ted Trask <ttrask01@yahoo.com> | 2010-03-15 07:04:01 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2010-03-15 07:04:01 +0000 |
commit | 9dd269bd5327389f7bee9ec58fd4833b19ac4ab7 (patch) | |
tree | 6408764e943df22988604feccd92b6b8c6bca693 /tinydns-model.lua | |
parent | ec9b7ae2b1ed6dfaee0a2e220adb4fd5f94796b4 (diff) | |
download | acf-tinydns-9dd269bd5327389f7bee9ec58fd4833b19ac4ab7.tar.bz2 acf-tinydns-9dd269bd5327389f7bee9ec58fd4833b19ac4ab7.tar.xz |
Sort the permissions alphabetically.
Diffstat (limited to 'tinydns-model.lua')
-rw-r--r-- | tinydns-model.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tinydns-model.lua b/tinydns-model.lua index 5e55c57..bb8eaf8 100644 --- a/tinydns-model.lua +++ b/tinydns-model.lua @@ -386,6 +386,7 @@ function getuserpermissions(self, userid) for x in string.gmatch(entry, "([^,]+),?") do allowedlist[#allowedlist + 1] = x end local cnffile = {} recursedir(configdir, cnffile) + table.sort(cnffile) local allowed = cfe({ type="multi", value=allowedlist, label="TinyDNS Permissions", option=cnffile, descr="If no permissions are defined, then all are allowed" }) if #cnffile == 0 then allowed.errtxt = "No domains defined" @@ -413,6 +414,7 @@ function getrolepermissions(self, role) for x in string.gmatch(entry, "([^,]+),?") do allowedlist[#allowedlist + 1] = x end local cnffile = {} recursedir(configdir, cnffile) + table.sort(cnffile) local allowed = cfe({ type="multi", value=allowedlist, label="TinyDNS Permissions", option=cnffile, descr="If no permissions are defined, then all are allowed" }) if #cnffile == 0 then allowed.errtxt = "No domains defined" |