Pay attention to "public" flag and staff role

Main code rev. 1930