ENG-7068 database fails if security is enabled with no users

You can combine these 2 ifs.