/** * @see org.projectforge.business.ldap.LdapDao#getAdditionalObjectClasses(org.projectforge.business.ldap.LdapObject) */ @Override protected String[] getAdditionalObjectClasses(final LdapGroup obj) { final boolean posixAccount = ldapUserDao.isPosixAccountsConfigured() == true && groupDOConverter.isPosixAccountValuesEmpty(obj) == false; if (posixAccount == true) { return ADDITIONAL_OBJECT_CLASSES_WITH_POSIX_SUPPORT; } return ADDITIONAL_OBJECT_CLASSES; }
sortable), "usernames", cellItemListener)); if (ldapUserDao.isPosixAccountsConfigured() == true) { columns .add(new CellItemListenerPropertyColumn<GroupDO>(getString("group.ldapValues"), "ldapValues", "ldapValues",
/** * @see org.projectforge.business.ldap.LdapDao#getAdditionalObjectClasses(org.projectforge.business.ldap.LdapObject) */ @Override protected String[] getAdditionalObjectClasses(final LdapUser obj) { final boolean posixAccount = isPosixAccountsConfigured() == true && PFUserDOConverter.isPosixAccountValuesEmpty(obj) == false; final boolean sambaAccount = isSambaAccountsConfigured() == true && PFUserDOConverter.isSambaAccountValuesEmpty(obj) == false; if (ALL_OBJECT_CLASSES == null) { initializeObjectClasses(); } if (posixAccount == true) { if (sambaAccount == true) { return ALL_OBJECT_CLASSES_WITH_SAMBA_AND_POSIX_ACCOUNT; } return ALL_OBJECT_CLASSES_WITH_POSIX_ACCOUNT; } if (sambaAccount == true) { return ALL_OBJECT_CLASSES_WITH_SAMBA_ACCOUNT; } return ALL_OBJECT_CLASSES; }
if (ldapUserDao.isPosixAccountsConfigured() == true) { columns .add(new CellItemListenerPropertyColumn<PFUserDO>(getString("user.ldapValues"), "ldapValues", "ldapValues",
/** * Copies the fields. * * @param src * @param dest * @return true if any modification is detected, otherwise false. */ public boolean copyGroupFields(final LdapGroup src, final LdapGroup dest) { boolean modified; final List<String> properties = new LinkedList<String>(); ListHelper.addAll(properties, "description", "organization"); if (ldapUserDao.isPosixAccountsConfigured() == true && isPosixAccountValuesEmpty(src) == false) { ListHelper.addAll(properties, "gidNumber"); } modified = BeanHelper.copyProperties(src, dest, true, properties.toArray(new String[0])); // Checks if the sets aren't equal: if (SetUtils.isEqualSet(src.getMembers(), dest.getMembers()) == false) { if (LdapGroupDao.hasMembers(src) == true || LdapGroupDao.hasMembers(dest) == true) { // If both, src and dest have no members, then do nothing, otherwise: modified = true; dest.clearMembers(); dest.addAllMembers(src.getMembers()); } } return modified; } }
"deactivated", "restrictedUser"); if (ldapUserDao.isPosixAccountsConfigured() == true && isPosixAccountValuesEmpty(src) == false) { ListHelper.addAll(properties, "uidNumber", "gidNumber", "homeDirectory", "loginShell");
createAndAddModificationItems(list, "uniqueMember", NONE_UNIQUE_MEMBER_ID); final boolean modifyPosixAccount = ldapUserDao.isPosixAccountsConfigured() == true && groupDOConverter.isPosixAccountValuesEmpty(group) == false; if (modifyPosixAccount == true) {
final boolean modifyPosixAccount = isPosixAccountsConfigured() == true && PFUserDOConverter.isPosixAccountValuesEmpty(user) == false; final boolean modifySambaAccount = isSambaAccountsConfigured() == true
/** * @see org.projectforge.business.ldap.LdapDao#mapToObject(java.lang.String, javax.naming.directory.Attributes) */ @Override protected LdapGroup mapToObject(final String dn, final Attributes attributes) throws NamingException { final LdapGroup group = new LdapGroup(); group.setBusinessCategory(LdapUtils.getAttributeStringValue(attributes, "businessCategory")); group.setDescription(LdapUtils.getAttributeStringValue(attributes, "description")); group.setOrganization(LdapUtils.getAttributeStringValue(attributes, "o")); final String[] members = LdapUtils.getAttributeStringValues(attributes, "uniqueMember"); if (members != null) { for (final String member : members) { group.addMember(member, ldapConfig.getBaseDN()); } } final boolean posixAccountsConfigured = ldapUserDao.isPosixAccountsConfigured(); if (posixAccountsConfigured == true) { final String no = LdapUtils.getAttributeStringValue(attributes, "gidNumber"); group.setGidNumber(NumberHelper.parseInteger(no)); } return group; }
gridBuilder.newFormHeading(getString("ldap")); gridBuilder.newSplitPanel(GridSize.COL50); final boolean posixConfigured = ldapUserDao.isPosixAccountsConfigured(); if (posixConfigured == false) { return;
ldapPersonDao.mapToObject(dn, user, attributes); ldapConfig = ldapService.getLdapConfig(); final boolean posixAccountsConfigured = isPosixAccountsConfigured(); final boolean sambaAccountsConfigured = isSambaAccountsConfigured(); if (posixAccountsConfigured == true || sambaAccountsConfigured == true) {
.addCheckBox(new PropertyModel<Boolean>(data, "localUser"), null) .setTooltip(getString("user.localUser.tooltip")); final boolean posixConfigured = ldapUserDao.isPosixAccountsConfigured(); final boolean sambaConfigured = ldapUserDao.isSambaAccountsConfigured(); if (posixConfigured == false && sambaConfigured == false) {