Reformat code
Fix NoSuchElementException

In case there are no secure objects, the page for managing
permissions doesn't load.

Untested.
Merge branch bugs/secobj_nosuchelement