<% local view= ... %> <% --[[ io.write(html.cfe_unpack(view)) --]] %> <% ---[[ %> <% if view.value.userid then %>

Roles/Permission list for <%= html.html_escape(view.value.userid.value) %>:

<% elseif view.value.role then %>

Permission list for <%= html.html_escape(view.value.role.value) %>:

<% else %>

Complete permission list:

<% end %> <% if view.value.roles then %>

<%= html.html_escape(view.value.userid.value) %> is valid in these roles

<% for a,b in pairs(view.value.roles.value) do print("
",html.html_escape(b),"
 
") end %>
<% end %> <% --]] %> <% ---[[ %> <% if view.value.permissions then %> <% if view.value.userid then %>

<%= html.html_escape(view.value.userid.value) %>'s full permissions are

<% elseif view.value.role then %>

<%= html.html_escape(view.value.role.value) %>'s full permissions are

<% end %>
<% local controllers = {} -- It's nice to have it in alphabetical order for cont in pairs(view.value.permissions.value) do controllers[#controllers + 1] = cont end table.sort(controllers) io.write("") io.write("") for x,cont in ipairs(controllers) do print("") end io.write("
ControllerAction(s)
",html.html_escape(cont),"") -- Again, alphabetical order local actions = {} for act in pairs(view.value.permissions.value[cont]) do actions[#actions + 1] = act end table.sort(actions) for y,act in pairs(actions) do print((html.html_escape(act))) end io.write("
") %>
<% end %> <% --]] %>