Skip to content
This repository has been archived by the owner on Apr 29, 2018. It is now read-only.

Commit

Permalink
some LDAP Attributes are read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
phaus committed Dec 24, 2017
1 parent 93b2dde commit 847ae8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1118,13 +1118,7 @@ private LdapUser fillAttributesInUser(LdapUser user, Attributes attributes) {
if (userIdentifyer.equals(key)) {
user.setUid(getAttributeOrNa(attributes, key));
}
if (LdapKeys.MODIFY_TIMESTAMP.equals(key)) {
user.setModifyTimestamp(getAttributeOrNa(attributes, key));
} else if (LdapKeys.MODIFIERS_NAME.equals(key)) {
user.setModifiersName(getAttributeOrNa(attributes, key));
} else if (LdapKeys.ENTRY_UUID.equals(key)) {
user.setEntryUUID(getAttributeOrNa(attributes, key));
} else if (LdapKeys.USER_PASSWORD.equals(key)) {
if (LdapKeys.USER_PASSWORD.equals(key)) {
user.addAttribute(new BasicAttribute(LdapKeys.USER_PASSWORD, null));
} else {
user.addAttribute((BasicAttribute) attributes.get(key));
Expand All @@ -1144,15 +1138,7 @@ private LdapGroup fillAttributesInGroup(LdapGroup group, Attributes attributes)
group = (LdapGroup) fillObjectClasses(group, attributes);
while (keys.hasMoreElements()) {
key = keys.nextElement();
if (LdapKeys.MODIFY_TIMESTAMP.equals(key)) {
group.setModifyTimestamp(getAttributeOrNa(attributes, key));
} else if (LdapKeys.MODIFIERS_NAME.equals(key)) {
group.setModifiersName(getAttributeOrNa(attributes, key));
} else if (LdapKeys.ENTRY_UUID.equals(key)) {
group.setEntryUUID(getAttributeOrNa(attributes, key));
} else {
group.addAttribute((BasicAttribute) attributes.get(key));
}
group.addAttribute((BasicAttribute) attributes.get(key));
if (groupIdentifyer.equals(key)) {
group.setCn(getAttributeOrNa(attributes, key));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,10 @@ public void setDn(final String dn) {
this.dn = dn;
}

public void setModifyTimestamp(final String modifyTimestamp) {
set(LdapKeys.MODIFY_TIMESTAMP, modifyTimestamp);
}

public void setModifiersName(final String modifiersName) {
set(LdapKeys.MODIFIERS_NAME, modifiersName);
}

public String getEntryUUID() {
return get(LdapKeys.ENTRY_UUID);
}

public void setEntryUUID(String entryUUID) {
set(LdapKeys.ENTRY_UUID, entryUUID);
}

public String getModifiersName() {
return get(LdapKeys.MODIFIERS_NAME);
}
Expand Down

0 comments on commit 847ae8b

Please sign in to comment.