Project

General

Profile

Revision e001877d

IDe001877db8b2aadba14c286801d7f23e91dee120
Parent 7d6b1e3a
Child fadb1f53

Added by Andreas Kohlbecker over 1 year ago

fix #8213 fixing db query for users witch have not created any references yet

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/StartRegistrationPresenter.java
108 108
                        );
109 109
                // restrict by allowed reference uuids
110 110
                Set<UUID> allowedUuids = referencePermissions.stream().filter(p -> p.getTargetUUID() != null).map(CdmAuthority::getTargetUUID).collect(Collectors.toSet());
111
                Criterion uuidRestriction = Restrictions.in("uuid", allowedUuids);
112
                criterion = Restrictions.and(criterion, Restrictions.or(pulishedOnly, uuidRestriction));
111
                if(!allowedUuids.isEmpty()){
112
                    Criterion uuidRestriction = Restrictions.in("uuid", allowedUuids);
113
                    criterion = Restrictions.and(criterion, Restrictions.or(pulishedOnly, uuidRestriction));
114
                } else {
115
                    criterion = Restrictions.and(criterion, pulishedOnly);
116
                }
113 117
            }
114 118
        }
115 119
        referencePagingProvider.addCriterion(criterion);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)