Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
RAVE-1273 | Orphaned page members shouldn't cause an NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanton Sievers committed Aug 11, 2014
1 parent 126f1fe commit a79d859
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -224,7 +224,8 @@ private boolean isPageMember(Authentication authentication, Page page, List<Page
List<PageUser> members = trustedPage.getMembers();
if (members != null) {
for (PageUser pageUser : members){
if (userRepository.get(pageUser.getUserId()).getUsername().equals(viewer)){
User user = userRepository.get(pageUser.getUserId());
if (user != null && user.getUsername().equals(viewer)){
log.info("User "+viewer+" is a member of page "+trustedPage.getId());
if(checkEditorStatus){
log.info("checking editor:"+trustedPage.getId()+"@"+viewer+"@"+pageUser.isEditor());
Expand All @@ -238,4 +239,4 @@ private boolean isPageMember(Authentication authentication, Page page, List<Page
return false;
}

}
}

0 comments on commit a79d859

Please sign in to comment.