diff options
-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" |