use of org.springframework.ldap.core.DirContextOperations in project perun by CESNET.
the class PerunUserImpl method synchronizePrincipals.
@Override
public void synchronizePrincipals(User user, List<UserExtSource> extSources) {
DirContextOperations entry = findByDN(buildDN(user));
doSynchronizePrincipals(entry, extSources);
ldapTemplate.modifyAttributes(entry);
}
use of org.springframework.ldap.core.DirContextOperations in project perun by CESNET.
the class PerunUserImpl method removePrincipal.
@Override
public void removePrincipal(User user, String login) {
DirContextOperations entry = findByDN(buildDN(user));
if (isEppnEpuidLogin(login)) {
entry.removeAttributeValue(PerunAttribute.PerunAttributeNames.ldapAttrEduPersonPrincipalNames, login);
}
entry.removeAttributeValue(PerunAttribute.PerunAttributeNames.ldapAttrUserIdentities, login);
ldapTemplate.modifyAttributes(entry);
}
use of org.springframework.ldap.core.DirContextOperations in project perun by CESNET.
the class PerunUserImpl method synchronizeAdminRoles.
@Override
public void synchronizeAdminRoles(User user, List<Group> admin_groups, List<Vo> admin_vos, List<Facility> admin_facilities) {
DirContextOperations entry = findByDN(buildDN(user));
doSynchronizeAdminRoles(entry, admin_groups, admin_vos, admin_facilities);
ldapTemplate.modifyAttributes(entry);
}
use of org.springframework.ldap.core.DirContextOperations in project perun by CESNET.
the class PerunGroupImpl method isMember.
public boolean isMember(Member member, Group group) {
DirContextOperations groupEntry = findByDN(buildDN(group));
Name userDN = addBaseDN(user.getEntryDN(String.valueOf(member.getUserId())));
return isMember(groupEntry, userDN);
}
use of org.springframework.ldap.core.DirContextOperations in project perun by CESNET.
the class PerunGroupImpl method addAsFacilityAdmin.
@Override
public void addAsFacilityAdmin(Group group, Facility facility) {
DirContextOperations entry = findByDN(buildDN(group));
Name facilityDN = addBaseDN(perunFacility.getEntryDN(String.valueOf(facility.getId())));
entry.addAttributeValue(PerunAttribute.PerunAttributeNames.ldapAttrAdminOfFacility, facilityDN.toString());
ldapTemplate.modifyAttributes(entry);
}
Aggregations