mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge V1.4 to HEAD
- Ignored Enterprise-specific changes svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3701 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3703 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3704 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3705 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3707 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3876 . svn revert root\projects\web-client\source\web\jsp\admin\admin-console.jsp git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3879 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -136,6 +136,49 @@ public abstract class AbstractAuditEntry
|
||||
{
|
||||
return recordOptions;
|
||||
}
|
||||
|
||||
|
||||
protected TrueFalseUnset getEffectiveAuditInternal()
|
||||
{
|
||||
TrueFalseUnset auditInternal;
|
||||
if (checkEnabled() == TrueFalseUnset.TRUE)
|
||||
{
|
||||
auditInternal = getAuditInternalOrParentAuditInternal();
|
||||
}
|
||||
else
|
||||
{
|
||||
auditInternal = TrueFalseUnset.FALSE;
|
||||
}
|
||||
if(s_logger.isDebugEnabled())
|
||||
{
|
||||
s_logger.debug("... Effective audit internal is = "+auditInternal);
|
||||
}
|
||||
return auditInternal;
|
||||
}
|
||||
|
||||
private TrueFalseUnset getAuditInternalOrParentAuditInternal()
|
||||
{
|
||||
TrueFalseUnset auditInternal = getAuditInternal();
|
||||
if(s_logger.isDebugEnabled())
|
||||
{
|
||||
s_logger.debug("... ... audit internal is = "+auditInternal);
|
||||
}
|
||||
if (auditInternal == TrueFalseUnset.UNSET)
|
||||
{
|
||||
if (getParent() == null)
|
||||
{
|
||||
return TrueFalseUnset.UNSET;
|
||||
}
|
||||
else
|
||||
{
|
||||
return getParent().getAuditInternalOrParentAuditInternal();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return auditInternal;
|
||||
}
|
||||
}
|
||||
|
||||
protected AuditMode getEffectiveAuditMode()
|
||||
{
|
||||
|
@@ -217,4 +217,23 @@ public class AuditEntry extends AbstractAuditEntry implements InitializingBean,
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public TrueFalseUnset getAuditInternalServiceMethods( MethodInvocation mi)
|
||||
{
|
||||
String serviceName = getPublicServiceIdentifier().getPublicServiceName(mi);
|
||||
ServiceAuditEntry service = services.get(serviceName);
|
||||
if(service != null)
|
||||
{
|
||||
return service.getAuditInternalServiceMethods( mi);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(s_logger.isDebugEnabled())
|
||||
{
|
||||
s_logger.debug("No specific audit entry for service "+serviceName);
|
||||
}
|
||||
return getEffectiveAuditInternal();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -56,4 +56,13 @@ public class MethodAuditEntry extends AbstractNamedAuditEntry implements MethodA
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public TrueFalseUnset getAuditInternalServiceMethods(MethodInvocation mi)
|
||||
{
|
||||
if(s_logger.isDebugEnabled())
|
||||
{
|
||||
s_logger.debug("Evaluating if method is internally audited ..."+((ServiceAuditEntry)getParent()).getName()+"."+getName());
|
||||
}
|
||||
return getEffectiveAuditInternal();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -97,4 +97,22 @@ public class ServiceAuditEntry extends AbstractNamedAuditEntry implements Method
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public TrueFalseUnset getAuditInternalServiceMethods(MethodInvocation mi)
|
||||
{
|
||||
String methodName = mi.getMethod().getName();
|
||||
MethodAuditEntry method = methods.get(methodName);
|
||||
if (method != null)
|
||||
{
|
||||
return method.getAuditInternalServiceMethods(mi);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(s_logger.isDebugEnabled())
|
||||
{
|
||||
s_logger.debug("Evaluating if service is internally audited (no specific setting) for "+getName()+"."+methodName);
|
||||
}
|
||||
return getEffectiveAuditInternal();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user