mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
MT: File which exceeds user quota can be uploaded via FTP, but it's size is 0 bytes. ALF-6721.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@26930 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -466,10 +466,20 @@
|
|||||||
</property>
|
</property>
|
||||||
|
|
||||||
<!-- Custom share mapper when multi-tenancy is enabled -->
|
<!-- Custom share mapper when multi-tenancy is enabled -->
|
||||||
<!--
|
<!--
|
||||||
<property name="shareMapper"> <bean class="org.alfresco.filesys.alfresco.MultiTenantShareMapper"> <property
|
<property name="shareMapper">
|
||||||
name="serverConfiguration"> <ref bean="fileServerConfiguration" /> </property> <property name="debug">
|
<bean class="org.alfresco.filesys.alfresco.MultiTenantShareMapper">
|
||||||
<value>true</value> </property> </bean> </property>
|
<property name="serverConfiguration">
|
||||||
|
<ref bean="fileServerConfiguration" />
|
||||||
|
</property>
|
||||||
|
<property name="quotaManager">
|
||||||
|
<ref bean="filesystemQuotaManager"/>
|
||||||
|
</property>
|
||||||
|
<property name="debug">
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
</property>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Global access control list -->
|
<!-- Global access control list -->
|
||||||
|
@@ -38,6 +38,7 @@ import org.alfresco.jlan.server.core.SharedDeviceList;
|
|||||||
import org.alfresco.jlan.server.filesys.DiskSharedDevice;
|
import org.alfresco.jlan.server.filesys.DiskSharedDevice;
|
||||||
import org.alfresco.jlan.server.filesys.FilesystemsConfigSection;
|
import org.alfresco.jlan.server.filesys.FilesystemsConfigSection;
|
||||||
import org.alfresco.jlan.server.filesys.SrvDiskInfo;
|
import org.alfresco.jlan.server.filesys.SrvDiskInfo;
|
||||||
|
import org.alfresco.jlan.server.filesys.quota.QuotaManager;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
@@ -68,6 +69,10 @@ public class MultiTenantShareMapper implements ShareMapper, ConfigurationListene
|
|||||||
|
|
||||||
private Hashtable<String, SharedDeviceList> m_tenantShareLists;
|
private Hashtable<String, SharedDeviceList> m_tenantShareLists;
|
||||||
|
|
||||||
|
// Quota manager to use when creating multi-tenant shares
|
||||||
|
|
||||||
|
private QuotaManager m_quotaManager;
|
||||||
|
|
||||||
// Debug enable flag
|
// Debug enable flag
|
||||||
|
|
||||||
private boolean m_debug;
|
private boolean m_debug;
|
||||||
@@ -94,6 +99,14 @@ public class MultiTenantShareMapper implements ShareMapper, ConfigurationListene
|
|||||||
this.m_debug = debug;
|
this.m_debug = debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the quota manager to be used by multi-tenant shares
|
||||||
|
*
|
||||||
|
* @param quotaManager QuotaManager
|
||||||
|
*/
|
||||||
|
public void setQuotaManager( QuotaManager quotaManager) {
|
||||||
|
m_quotaManager = quotaManager;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the share mapper
|
* Initialize the share mapper
|
||||||
@@ -418,6 +431,11 @@ public class MultiTenantShareMapper implements ShareMapper, ConfigurationListene
|
|||||||
ContentDiskDriver diskDrv = (ContentDiskDriver) m_alfrescoConfig.getRepoDiskInterface();
|
ContentDiskDriver diskDrv = (ContentDiskDriver) m_alfrescoConfig.getRepoDiskInterface();
|
||||||
ContentContext diskCtx = new ContentContext(m_tenantShareName, "", m_rootPath, rootNodeRef);
|
ContentContext diskCtx = new ContentContext(m_tenantShareName, "", m_rootPath, rootNodeRef);
|
||||||
|
|
||||||
|
// Set a quota manager for the share, if enabled
|
||||||
|
|
||||||
|
if ( m_quotaManager != null)
|
||||||
|
diskCtx.setQuotaManager( m_quotaManager);
|
||||||
|
|
||||||
// Enable file state caching
|
// Enable file state caching
|
||||||
|
|
||||||
diskCtx.enableStateCache( true);
|
diskCtx.enableStateCache( true);
|
||||||
|
Reference in New Issue
Block a user