git-svn-id: https://svn.libreccm.org/ccm/trunk@4202 8810af33-2d31-482b-a856-94f89814c4df

master
konermann 2016-07-19 18:51:38 +00:00
parent 01422e3f99
commit b72741aa17
1 changed files with 2 additions and 19 deletions

View File

@ -21,8 +21,6 @@ package com.arsdigita.cms.dispatcher;
import com.arsdigita.bebop.parameters.BigDecimalParameter;
import com.arsdigita.cms.BinaryAsset;
import com.arsdigita.cms.Asset;
import com.arsdigita.cms.FileAsset;
import com.arsdigita.cms.FileAssetAccessChecker;
import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.dispatcher.RequestContext;
import com.arsdigita.domain.DataObjectNotFoundException;
@ -30,7 +28,6 @@ import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.mimetypes.MimeType;
import com.arsdigita.persistence.OID;
import com.arsdigita.toolbox.ui.OIDParameter;
import com.arsdigita.web.Web;
import org.apache.log4j.Logger;
import java.io.IOException;
@ -173,7 +170,6 @@ class BaseAsset extends ResourceHandlerImpl {
if (a instanceof BinaryAsset) {
asset = (BinaryAsset) a;
} else {
if (s_log.isInfoEnabled()) {
s_log.info("Asset " + oid + " is not a BinaryAsset");
@ -193,20 +189,7 @@ class BaseAsset extends ResourceHandlerImpl {
return;
}
//check if the content asset is still published:
// boolean hasAccess = false;
// for (FileAssetAccessChecker checker : FileAsset.assetAccessCheckerList) {
// if(checker.hasAccess((FileAsset) asset)){
// hasAccess = true;
// break;
// }
// }
//return asset if its published or the user is logged in and hereby
// authorized to access content even if its unpublished.
if(Web.getUserContext().isLoggedIn() || asset.isLiveVersion()){
setHeaders(response, asset);
send(response, asset);
}
setHeaders(response, asset);
send(response, asset);
}
}