core icon indicating copy to clipboard operation
core copied to clipboard

Remote Publishing NullPointer because we try to publish passing a null User

Open graz1an0 opened this issue 13 years ago • 4 comments

Into the viewpublishcontent_list.jsp we call

graz1an0 avatar Mar 04 '13 11:03 graz1an0

Sorry...Into the view_publish_content_list.jsp we call "publisherAPI.addContentsToPublish(identifiers, bundeId, date)" or "publisherAPI.addContentsToUnpublish(identifiers, bundeId, date)" without the user...this will cause a NullPointer into the PublisherAPIImpl at this line

if (!strPerAPI.doesUserHavePermission(iden,PermissionAPI.PERMISSION_PUBLISH, user)) { Logger.info(PublisherAPIImpl.class, "User: " + user.getUserId() + " does not have Publish Permission over asset with Identifier: " + iden.getId() ); continue; }

because the "doesUserHavePermission" is called with null user (anonymous) but this is not the right scenario. The nullPointer is into the Logger call "user.getUserId()"

graz1an0 avatar Mar 04 '13 11:03 graz1an0

I can handle this one and maybe I commit into my previous branch but with the link at this issue.

graz1an0 avatar Mar 04 '13 11:03 graz1an0

no this is fixed now. make sure u have the latest code. i fixed this late last week

jtesser avatar Mar 04 '13 11:03 jtesser

yes in the master the code in that JSP is

                if(addOperationType.equals("add")){
                    publisherAPI.addContentsToPublish(identifiers, bundeId, date, user);
                } else {
                    publisherAPI.addContentsToUnpublish(identifiers, bundeId, date, user);
                }

jtesser avatar Mar 04 '13 11:03 jtesser