fix admin permission check in application layout