mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
MT - fix SLNG-1183
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10890 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
<import resource="classpath:alfresco/network-protocol-context.xml" />
|
<import resource="classpath:alfresco/network-protocol-context.xml" />
|
||||||
<import resource="classpath:alfresco/emailserver/email-service-context.xml" />
|
<import resource="classpath:alfresco/emailserver/email-service-context.xml" />
|
||||||
<import resource="classpath:alfresco/content-services-context.xml" />
|
<import resource="classpath:alfresco/content-services-context.xml" />
|
||||||
<import resource="classpath*:alfresco/mt/*-context.xml"/>
|
<import resource="classpath:alfresco/mt/st-admin-context.xml"/>
|
||||||
<import resource="classpath:alfresco/hibernate-context.xml" />
|
<import resource="classpath:alfresco/hibernate-context.xml" />
|
||||||
<import resource="classpath:alfresco/ownable-services-context.xml" />
|
<import resource="classpath:alfresco/ownable-services-context.xml" />
|
||||||
<import resource="classpath:alfresco/template-services-context.xml" />
|
<import resource="classpath:alfresco/template-services-context.xml" />
|
||||||
|
@@ -4,7 +4,18 @@
|
|||||||
<!-- Beans pertinent to content usage / quota service -->
|
<!-- Beans pertinent to content usage / quota service -->
|
||||||
<beans>
|
<beans>
|
||||||
|
|
||||||
<bean id="usageService" class="org.alfresco.repo.usage.UsageServiceImpl">
|
<bean id="usageService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
|
<property name="target">
|
||||||
|
<ref bean="usageServiceImpl" />
|
||||||
|
</property>
|
||||||
|
<property name="interceptorNames">
|
||||||
|
<list>
|
||||||
|
<value>multiTNodeServiceInterceptor</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="usageServiceImpl" class="org.alfresco.repo.usage.UsageServiceImpl">
|
||||||
<property name="usageDeltaDAO" ref="usageDeltaDAO"/>
|
<property name="usageDeltaDAO" ref="usageDeltaDAO"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
@@ -1139,7 +1139,7 @@ public class MultiTAdminServiceImpl implements TenantAdminService, ApplicationCo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// tenant deployer services delegated to tenant service
|
// tenant deployer/user services delegated to tenant service
|
||||||
|
|
||||||
public boolean isEnabled()
|
public boolean isEnabled()
|
||||||
{
|
{
|
||||||
@@ -1151,6 +1151,11 @@ public class MultiTAdminServiceImpl implements TenantAdminService, ApplicationCo
|
|||||||
return tenantService.getCurrentUserDomain();
|
return tenantService.getCurrentUserDomain();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUserDomain(String username)
|
||||||
|
{
|
||||||
|
return tenantService.getUserDomain(username);
|
||||||
|
}
|
||||||
|
|
||||||
public String getDomainUser(String baseUsername, String tenantDomain)
|
public String getDomainUser(String baseUsername, String tenantDomain)
|
||||||
{
|
{
|
||||||
return tenantService.getDomainUser(baseUsername, tenantDomain);
|
return tenantService.getDomainUser(baseUsername, tenantDomain);
|
||||||
|
@@ -109,6 +109,14 @@ public class SingleTAdminServiceImpl implements TenantAdminService
|
|||||||
return TenantService.DEFAULT_DOMAIN;
|
return TenantService.DEFAULT_DOMAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns {@link TenantService#DEFAULT_DOMAIN} always
|
||||||
|
*/
|
||||||
|
public String getUserDomain(String username)
|
||||||
|
{
|
||||||
|
return TenantService.DEFAULT_DOMAIN;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Returns the given <tt>baseUserName</tt> always
|
* @return Returns the given <tt>baseUserName</tt> always
|
||||||
*/
|
*/
|
||||||
|
@@ -3,7 +3,7 @@ package org.alfresco.repo.tenant;
|
|||||||
/**
|
/**
|
||||||
* Interface for Tenant User-Domain functionality.
|
* Interface for Tenant User-Domain functionality.
|
||||||
*
|
*
|
||||||
* @author Jan Vonka
|
* @author janv
|
||||||
* @author Derek Hulley
|
* @author Derek Hulley
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
@@ -11,9 +11,11 @@ public interface TenantUserService
|
|||||||
{
|
{
|
||||||
public String getCurrentUserDomain();
|
public String getCurrentUserDomain();
|
||||||
|
|
||||||
public String getDomainUser(String baseUsername, String tenantDomain);
|
|
||||||
|
|
||||||
public String getDomain(String name);
|
public String getDomain(String name);
|
||||||
|
|
||||||
|
public String getUserDomain(String username);
|
||||||
|
|
||||||
|
public String getDomainUser(String baseUsername, String tenantDomain);
|
||||||
|
|
||||||
public boolean isEnabled();
|
public boolean isEnabled();
|
||||||
}
|
}
|
||||||
|
@@ -254,9 +254,16 @@ public class UserUsageTrackingComponent
|
|||||||
// execute in READ-ONLY txn
|
// execute in READ-ONLY txn
|
||||||
final Set<String> userNames = txnHelper.doInTransaction(getAllPeople, true);
|
final Set<String> userNames = txnHelper.doInTransaction(getAllPeople, true);
|
||||||
|
|
||||||
for (String userName : userNames)
|
for (final String userName : userNames)
|
||||||
{
|
{
|
||||||
recalculateUsage(userName);
|
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||||
|
{
|
||||||
|
public Object doWork() throws Exception
|
||||||
|
{
|
||||||
|
recalculateUsage(userName);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}, tenantAdminService.getDomainUser(AuthenticationUtil.getSystemUserName(), tenantAdminService.getUserDomain(userName)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
|
Reference in New Issue
Block a user