Details
-
Bug
-
Resolution: Fixed
-
High
-
3.9, 3.9.1, 3.9.2
-
3.09
-
Description
A scenario which we discovered from a user's support request:
- Enable anonymous comment (Add "Anyone" to "Add Comment" and "Browse Project" permission)
- Ensure that users are added into the "Administrators" role in the project role mapping, e.g. Users: Foo, Bar; Groups: jira-administrators
- View issue without logging into JIRA and you will notice two things:
- NPE thrown and logged in the log file:
2007-06-22 18:33:12,937 http-8090-Processor4 ERROR [webwork.util.ServletValueStack] METHOD: "createHtml", exception: java.lang.NullPointerException at com.atlassian.jira.security.roles.actor.UserRoleActorFactory$UserRoleActor.contains(UserRoleActorFactory.java:114) at com.atlassian.jira.security.roles.CachingProjectRoleAndActorStore$CachedDefaultRoleActors.contains(CachingProjectRoleAndActorStore.java:465) at com.atlassian.jira.security.roles.DefaultProjectRoleManager.getProjectRoles(DefaultProjectRoleManager.java:37) at com.atlassian.jira.issue.fields.CommentSystemField.getRoleLevels(CommentSystemField.java:515) at com.atlassian.jira.issue.fields.CommentSystemField.populateVelocityParams(CommentSystemField.java:407) at com.atlassian.jira.issue.fields.CommentSystemField.getCreateHtml(CommentSystemField.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- Comment fields disappeared (although the "Add Comment" container is visible)
- NPE thrown and logged in the log file:
This happens because both UserRoleActorFactory and GroupRoleActorFactory are added to the CachedDefaultRoleActors as its construction level.