Uploaded image for project: 'JCommune'
  1. JCommune
  2. JC-2288

Do not show stack trace in case of access denied for voting

VotersWatchers
    XMLWordPrintable

    Details

      Description

      For this we should have one line of logs (INFO level):

      2016-02-14 13:26:02 [DEBUG][o-8080-exec-2278][anonymous-8200][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - org.springframework.security.web.servletapi.Security
      ContextHolderAwareRequestWrapper@780461a8
      org.springframework.security.access.AccessDeniedException: Access is denied
              at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:71)
              at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:203)
              at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at etm.contrib.aop.aopalliance.EtmMethodCallInterceptor.invoke(EtmMethodCallInterceptor.java:62)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)

      The line should tell us the username (in this case anonymous-8200), the operation (voting - ideally voting up or voting down) and the URL and params (see other error handling logging in PrettyLogExceptionResolver).

        Attachments

          Structure

            Activity

              People

              • Assignee:
                vldmrtyurin Vladimir Tyurin
                Reporter:
                ctapobep Stanislav Bashkyrtsev
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Structure Helper Panel