Fix default policy user logic

To determine the policy to apply, the following rules are checked in this order:

1) A pool specific policy on the protocol exists? Use it
2) A default pool policy on the protocol exists? Use it
3) A pool specific policy on the category exists? Use it
4) A defaul pool policy on the category exists? Use it
5) Use the global policy
This commit is contained in:
emanuele-f 2017-12-07 13:46:47 +01:00
parent 5f627b254f
commit 0d433df91b
11 changed files with 95 additions and 15 deletions

View file

@ -1707,9 +1707,11 @@ function printPoolChangeDropdown(pool_id)
output[#output + 1] = poolDropdown(pool_id)
local edit_pools_link = ternary(haveNedge2(), "/lua/pro/admin/nf_list_users.lua", "/lua/if_stats.lua?page=pools#create")
output[#output + 1] = [[
</select>&nbsp;
<A HREF=/lua/if_stats.lua?page=pools#create><i class="fa fa-sm fa-cog" aria-hidden="true" title="]] .. i18n("host_pools.edit_host_pools") .. [["></i> ]]
<A HREF="]] .. ntop.getHttpPrefix() .. edit_pools_link .. [["><i class="fa fa-sm fa-cog" aria-hidden="true" title="]] .. i18n("host_pools.edit_host_pools") .. [["></i> ]]
.. i18n("host_pools.edit_host_pools") .. [[</A>
</tr>]]