Details
-
Bug
-
Resolution: Fixed
-
Low
-
6.2.3, 6.5.0
-
Severity 2 - Major
-
0
-
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
- Configure Bamboo to use LDAP for user management
- 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)
- Synchronize Bamboo with the LDAP server
- Grant the user whom you added to LDAP permission on a plan
- 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.