Project

General

Profile

« Previous | Next » 

Revision 7061

transitive properties for mapped subjects:
-group membership
-verified flag
https://redmine.dataone.org/issues/2430
https://redmine.dataone.org/issues/2432

View differences:

src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
754 754
							}
755 755
						}
756 756
						// add the equivalent identities
757
						List<Subject> equivList = p
758
								.getEquivalentIdentityList();
757
						List<Subject> equivList = p.getEquivalentIdentityList();
759 758
						if (equivList != null) {
760
							for (Subject equiv : equivList) {
761
								subjects.add(equiv);
759
							for (Subject equivSubject : equivList) {
760
								subjects.add(equivSubject);
761
								// find that entry
762
								for (Person equivPerson: personList) {
763
									if (equivSubject.equals(equivPerson.getSubject())) {
764
										// transitive group membership
765
										if (equivPerson.getIsMemberOfList() != null) {
766
											for (Subject equivGroup: equivPerson.getIsMemberOfList()) {
767
												subjects.add(equivGroup);
768
											}
769
										}
770
										// TODO: is verified transitive?
771
										if (equivPerson.getVerified() != null && equivPerson.getVerified()) {
772
											// add the verified symbolic user
773
											if (!subjects.contains(verifiedSubject)) {
774
												subjects.add(verifiedSubject);
775
											}
776
										}
777
									}
778
								}
762 779
							}
763 780
						}
764 781
						// add the groups they are a member of

Also available in: Unified diff