cancel
Showing results for 
Search instead for 
Did you mean: 

Audit trail

yusuf
Champ in-the-making
Champ in-the-making
Hi all,

Is it possible to see who has accessed a document, not for editing but just for reading.
And if so how is it done?

Thanksin advance,
Yusuf
14 REPLIES 14

skorde
Champ in-the-making
Champ in-the-making
do changes in auditConfig.xml

<Service name="ContentService" mode="none">
        <Method name="getWriter" mode="all"/>
      <Method name="getReader" mode="all" auditInternal="true"/>
        <Method name="transform" mode="all"/>
    </Service>

sumitweirminera
Champ in-the-making
Champ in-the-making
Hi,

I have added the code mentioned in the post, please advice on how to veiw the audit infomration.

Thank you

sumitweirminera
Champ in-the-making
Champ in-the-making
Can somebody send me the screen shot of audit report, please????

rbergstrom
Champ in-the-making
Champ in-the-making
Can somebody send me the screen shot of audit report, please????

I can't send you a screenshot, however if you change the custom view of a space to show_audit.ftl, you can see the audit information for that space.  Using the template as a guide, you could do something more sophisticated.

// RAB

skorde
Champ in-the-making
Champ in-the-making
Why don't u try this one
<#– Shows some general audit info about the current document –>
<#if document?exists>
   <h4>Current Docuement Audit Info</h4>
   <b>Name:</b> ${document.name}
   <br>
   <br>
   <table border="1" width='100%' cellspacing="1" cellpadding="4">
   <tr align="left" class="rowheader">
          <th>Date</th>
        <th>User</th>         
       <th>User Address</th>
      <th>Action</th>
         
                   
   </tr>

<#list document.auditTrail as t>
<#if t.auditMethod?exists>
<#if t.auditMethod == "createNode" || t.auditMethod == "create" ||  t.auditMethod == "getWriter" || t.auditMethod == "checkout" || t.auditMethod == "unlock" || t.auditMethod == "lock" || t.auditMethod == "copy"  || t.auditMethod == "checkin" || t.auditMethod == "move" || t.auditMethod=="getReader">

<tr>
          <td>${t.date}</td>
          <td>${t.userIdentifier}</td>
          <td>${t.hostAddress}</td>
          <#– Shows some USER FRINDLY info based on method  –>
       <#if t.auditMethod?exists>
           <#if t.auditMethod == "create">
             <td>Created</td>
           </#if>
          <#if t.auditMethod == "createNode" && t.methodArgumentsAsStrings[1] == "{http://www.alfresco.org/model/content/1.0}contains">
             <td>Create</td>
         </#if>
    
      <#if t.auditMethod == "getWriter">
             <td>Edit</td>
         </#if>
      <#if t.auditMethod == "getReader">
             <td>Read</td>
         </#if>
      <#if t.auditMethod == "checkout" || t.auditMethod == "unlock">
             <td>Check-Out</td>
         </#if>
      <#if t.auditMethod == "copy">
             <td>Copy</td>
         </#if>
      <#if t.auditMethod == "checkin" || t.auditMethod == "lock">
             <td>Check-In</td>
         </#if>
      <#if t.auditMethod == "move">
             <td>Paste</td>
         </#if>
      <#if t.auditMethod == "createNode" && t.methodArgumentsAsStrings[2]== "{http://www.alfresco.org/model/forum/1.0}discussion">
             <td>Discussion Create</td>
         </#if>
         
         <#else>
             <td> </td>
        </#if>         
         
         
</tr>
</#if>
</#if>          
</#list>
</table>
<#elseif space?exists>
   <h4>Current Space Audit Info:</h4>
   <b>Name:</b> ${space.name}<br><br>
   <table border="1" width="100%" cellspacing="1" cellpadding="4">
   <tr align="left" class="rowheader">
          <th>Date</th>
         <th>User</th>
          <th>User Address</th>
         <th>Action</th>
         <th>Type</th>
         <th>Name</th>
        
                   
   </tr>

   <#list space.auditTrail as t>
  <#if t.auditMethod == "create" ||  t.auditMethod == "getWriter" || t.auditMethod == "checkout" || t.auditMethod ==  "copy"  || t.auditMethod == "checkin" || t.auditMethod == "move" || t.auditMethod=="getReader" ||t.auditMethod=="createNode" >
   <tr>
           <td>${t.date}</td>
<td>${t.userIdentifier}</td>
          <td>${t.hostAddress}</td>

<#– Shows some USER FRINDLY info based on method  –>
<#if t.auditMethod?exists>
<#if t.auditMethod == "create">
<td>Created </td>          

<#if t.methodArgumentsAsStrings[2]=="{http://www.alfresco.org/model/content/1.0}folder">
<td> Folder </td>          
<td>${t.methodArgumentsAsStrings[1]}</td>          
<#else>
<td> File </td>          
<td>${t.methodArgumentsAsStrings[1]}</td>          
   </#if>
</#if>
<#if t.auditMethod == "getWriter">
         <td>Edit</td>
         <td>File</td>
      </#if>
<#if t.auditMethod == "getReader">
          <td>Read</td>
          <td>File</td>
      </#if>
<#if t.auditMethod == "checkout">
             <td>Check-out</td>
             <td> File</td>
      </#if>
<#if t.auditMethod == "copy">
             <td> Copy</td>
             <td> File</td>
             <td><#assign i = t.methodArgumentsAsStrings[2]?last_index_of("}") >
                 ${t.methodArgumentsAsStrings[2]?substring(i+1)}</td>
      </#if>
<#if t.auditMethod == "checkin">
             <td>Check-in</td>
             <td> File</td>
      </#if>
<#if t.auditMethod == "move">
<td> Paste</td>
<#if t.returnObjectAsString?exists>
<#assign fileinfo = t.returnObjectAsString >
<#if fileinfo?contains("true")><td>Folder</td> <#else><td>File</td> </#if>
</#if>
             <td><#assign i = t.methodArgumentsAsStrings[2]?last_index_of("}") >
             ${t.methodArgumentsAsStrings[2]?substring(i+1)}</td>
      </#if>
<#if t.auditMethod == "createNode">
<#if t.methodArgumentsAsStrings[2]?exists>
<td> Created</td>
<td> File</td>
             <td>
             <#assign i = t.methodArgumentsAsStrings[2]?last_index_of("}") >
             ${t.methodArgumentsAsStrings[2]?substring(i+1)}
              </td>
       </#if>
      </#if>
<#else>
       <td> </td>
</#if>        
</tr>
</#if>
</#list>
</table>
</#if>

Note:this is my modified show_audit.ftl just copy and past the code.

skorde
Champ in-the-making
Champ in-the-making
Hi
I have enable auditing in my production copy(Alfresco2.1+oracle9i),it is working fine and storing  a required information in database except some of the field like CLIENT_ADDRESS,MESSAGE etc.
my question is

Why this field is null,specially CLIENT_ADDRESS?
Why alfresco not stored the data in this filed?
is auditing still in under development stage?


Thanks in Advanced

skorde
Champ in-the-making
Champ in-the-making
Hi
I have enable Audit Trail on Alfresco 2.1 Community version
But I don't understand why it creating multiple entries for example
When I create file it's showing in there template it has been created(create method) and edit(get Writer method).
When I edit  file  through CIFS it will created multiple entries in database for the same operation like read several times,edit etc.

Thanks in Advanced

norgan
Champ in-the-making
Champ in-the-making
Hi Skorde,
I would guess that is related to the CIFS protocoll for accessing filesystems. If you do a webdav or an FTP, that should be different as well. If you want to try webdav, you (probably) need to reactivate the webdav function in windows.

-> c:\windows\system32\webfldrs.msi
and7or use the "Open as Webfolder" Extension for firefox

Regards, Norgan

skorde
Champ in-the-making
Champ in-the-making
Thanks for post

Yea! It’s actually the problem exists with CIFS protocol, but we don't want to disable this feature,
We want solution, how we can restrict alfresco for storing this unnecessary information (several times read, create temp file) in Audit table