def all_public():
 for l in Layer.objects.all():
  l.set_default_permissions()
 for m in Map.objects.all():
  m.set_default_permissions()
 for d in Document.objects.all():
  d.set_default_permissions()

def all_public ( ) : for l in Layer . objects . all ( ) : l . set_default_permissions ( ) for m in Map . objects . all ( ) : m . set_default_permissions ( ) for d in Document . objects . all ( ) : d . set_default_permissions ( )
ensure all layers .