Skip to content
Browse files

fixing bug #5205

  • Loading branch information...
1 parent fa37fa5 commit 29dd4e5049ecf58cf8c662ca6c53211eb16461bb @CecileBONIN CecileBONIN committed Jan 15, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/main/java/com/silverpeas/tags/kmelia/KmeliaTagUtil.java
View
6 src/main/java/com/silverpeas/tags/kmelia/KmeliaTagUtil.java
@@ -271,6 +271,12 @@ private void checkPublicationLocation(String pubId) throws RemoteException, Visi
}
private void checkPublicationLocation(PublicationDetail pubDetail) throws VisibilityException {
+ //instanceId must correspond to componentId set in the kmeliaTag
+ if(! pubDetail.getInstanceId().equals(getComponentId())){
+ throw new VisibilityException();
+ }
+
+ //publication must not be in basket (node 1)
List fathers = (List) getKmeliaBm().getPublicationFathers(pubDetail.getPK());
if (fathers == null || fathers.isEmpty() || (fathers.size() == 1
&& "1".equals(((NodePK) fathers.get(0)).getId()))) {

0 comments on commit 29dd4e5

Please sign in to comment.
Something went wrong with that request. Please try again.