Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-19937

Viewing Plan Permissions results in NullPointerException if one of the users has no full name

    XMLWordPrintable

Details

    Description

      Summary

      When viewing the permissions of a plan, a NullPointerException occurs if one of the users who has permissions on the plan does not have a full name set in their user profile.

      Steps to reproduce

      1. Configure Bamboo to use LDAP for user management
      2. Create a user in LDAP who does not have the attribute that you have configured to be the user's first and last name (Note: If the user has the attributes but they have no value, the problem will not arise)
      3. Synchronize Bamboo with the LDAP server
      4. Grant the user whom you added to LDAP permission on a plan
      5. Refresh the plan permissions page

      Expected Results

      The plan permissions are displayed

      Actual Results

      A NullPointerException occurs with a stack trace similar to the following:

      java.lang.NullPointerException
      	at java.util.Comparator.lambda$comparing$77a9974f$1(Unknown Source)
      	at java.util.TimSort.countRunAndMakeAscending(Unknown Source)
      	at java.util.TimSort.sort(Unknown Source)
      	at java.util.Arrays.sort(Unknown Source)
      	at java.util.ArrayList.sort(Unknown Source)
      	at java.util.stream.SortedOps$RefSortingSink.end(Unknown Source)
      	at java.util.stream.Sink$ChainedReference.end(Unknown Source)
      	at java.util.stream.Sink$ChainedReference.end(Unknown Source)
      	at java.util.stream.Sink$ChainedReference.end(Unknown Source)
      	at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
      	at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
      	at java.util.stream.ReferencePipeline.collect(Unknown Source)
      	at com.atlassian.bamboo.plugins.rest.permission.BasicPermissionResource.listUserPermissions(BasicPermissionResource.java:81)
      	at com.atlassian.bamboo.plugins.rest.permission.PlanPermissionsResource.listUserPermissions(PlanPermissionsResource.java:79)
      	at sun.reflect.GeneratedMethodAccessor2316.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      

      Workaround

      Ensure all LDAP users whom you are synchronizing with Bamboo have the required attributes for first and last name.

      Note

      By design it is not possible to create users without a full name in Bamboo when using Bamboo's built-in user database. However, if the backend database is modified manually and the column FULLNAME for the user's record in the USERS table has a NULL value, the problem also arises.

       

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              cglockner Christian Glockner
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: