title: How could I get access to the Audit log for non-admin users?
body: <p>I'm building a Web Part for SharePoint 2010 and I've found out that non-admin users are getting <code>Access Denied</code> error message when I execute the following code (the error is thrown in the last line):</p>
  
  <pre><code>SPAuditQuery wssQuery = new SPAuditQuery(web.Site);
  wssQuery.RestrictToUser(web.CurrentUser.ID);
  wssQuery.AddEventRestriction(SPAuditEventType.View);
  wssQuery.RestrictToList(SPContext.Current.List);
  
  SPAuditEntryCollection auditCol;
  auditCol = web.Site.Audit.GetEntries(wssQuery);
  </code></pre>
  
  <p>How can I let non-admin users access this log from the web part? Because I need to filter by nono-admin users, even if a non-admin user is logged in at that moment.</p>