Commits

Tim Olsen  committed 13b757a Merge

Merge xnat_1_4 modifications

  • Participants
  • Parent commits 8c995bd, 6c5b2a9

Comments (0)

Files changed (1)

File src/main/java/org/nrg/xft/utils/SaveItemHelper.java

 		}
 
 		if(i.getItem().getGenericSchemaElement().getType().getForeignPrefix().equals(XFT.PREFIX)){
-        	if (!((XDATUser)user).checkRole("Administrator"))
+        	if (user!=null && !((XDATUser)user).checkRole("Administrator"))
             {
         		throw new InvalidPermissionException("Only site administrators can store core documents.");
             }
 		}
 
 		if(i.getItem().getGenericSchemaElement().getType().getForeignPrefix().equals(XFT.PREFIX)){
-        	if (!((XDATUser)user).checkRole("Administrator"))
+        	if (user!=null && !((XDATUser)user).checkRole("Administrator"))
             {
         		throw new InvalidPermissionException("Only site administrators can store core documents.");
             }