if (ureq == null) throw new AssertException("HomeSiteDef.createSite: ureq was null");
if (ureq.getUserSession() == null) throw new AssertException("HomeSiteDef.createSite: ureq.getUserSession() was null");
if (ureq.getUserSession().getRoles() == null) throw new AssertException("HomeSiteDef.createSite: ureq.getUserSession().getRoles() was null");
if (ureq.getUserSession().getRoles().isGuestOnly()) {
// guest see this site (restricted rights and navigation)
si = new GuestHomeSite(ureq.getLocale());
} else { // all others see a normal homesite
si = new HomeSite(ureq.getLocale());
}
return si;
}