From 9dd269bd5327389f7bee9ec58fd4833b19ac4ab7 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 15 Mar 2010 07:04:01 +0000 Subject: Sort the permissions alphabetically. --- tinydns-model.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tinydns-model.lua') 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" -- cgit v1.2.3