Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-60644

If last name or emailAddress is not required, we shouldn't ask mapping these fields in LDAP setting

    Details

      Description

      1. Set up LDAP server and add a user in it with

      dn: cn=test1,ou=Users,dc=liferay,dc=com
      cn: test1
      givenName: test1
      objectClass: person
      objectClass: inetOrgPerson
      objectClass: organizationalPerson
      objectClass: top
      sn: test1
      userPassword:: e1NTSEF9dVplNG13WkV2ZVNVT3RrZlh0aW5iK0cyM0g0RjZib0EzNDNOVWc9PQ==
      

      (This is just a sample, we don't set mail)

      2. in portal-ext.properties, set

      users.email.address.required=false
      

      in /liferay-portal/portal-impl/src/content/Language.propertiesLanguage.properties, set

      lang.user.name.required.field.names=
      

      then run "ant build-lang" and "ant deploy" in /portal-impl. We want to set last name not required.

      3. Start portal. Go to control panel -> Configuration -> Portal Settings -> Authentication -> LDAP, check "Enable", "Enable Import".
      4. Go to control panel -> Configuration -> Portal Settings -> Authentication -> General -> "How do users authenticate?", select "By Screen Name"

      Please notice: as customer doesn't map for email address, so portal shouldn't use email address as users authenticate method. Because when do importing users, portal would do search for user with authenticate method as a searching condition. So please go to Control panel -> Configuration -> Portal Settings -> Authentication, "How do users authenticate?", change "By Email Address" to "By Screen Name". This is essential. If not doing this, portal would throw NPE because of no user is found.

      5. Add LDAP server, click Reset Values. Then click "Test LDAP Users". The user should be fetched.
      6. Remove Email Address or Last Name mapping.
      7. Then click "Test LDAP Users".

      Actual: It shows"Please map each of the user properties Screen Name, Password, Email Address, First Name, and Last Name to an LDAP attribute."
      Expect: The user should be fetched since email address and last name are not required.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                beck.liu Beck Liu
                Reporter:
                bejond.shao Bejond Shao (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 41 weeks ago

                  Packages

                  Version Package
                  7.0.0 Alpha 4