// so, we remove the Visible and replace with a RestrictAccess
ChromatticSession chromatticSession = session.getManager().getLifeCycle().getContext().getSession();
if (sourceNav.isAdapted(Visible.class)) {
chromatticSession.remove(sourceNav.adapt(Visible.class));
}
RestrictAccess restrictAccess = chromatticSession.create(RestrictAccess.class);
chromatticSession.setEmbedded(sourceNav, RestrictAccess.class, restrictAccess);
}
//
RestrictAccess restrictAccess = sourceNav.adapt(RestrictAccess.class);