Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-6274

AbstractLinksWebScript doesn't cope with Links from deleted users

    Details

    • Bug Priority:
      Category 3

      Description

      The `renderLink` method of AbstractLinksWebScript doesn't handle the case when the link creator no longer exists in the system. If the link was created by a now deleted user, a request to it (eg when listing the links in a site for the Links Dashlet in share) will fail with an exception like:

      Caused by: org.alfresco.service.cmr.security.NoSuchPersonException: 08281267 User does not exist and could not be created: userThatWillBeDeleted
      at org.alfresco.repo.security.person.PersonServiceImpl.getPersonImpl(PersonServiceImpl.java:461)
      at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:435)
      at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:412)
      at sun.reflect.GeneratedMethodAccessor788.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInv
      ocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.
      java:150)
      at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurit
      yInterceptor.java:80)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.
      java:172)
      at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:159)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy83.getPerson(Unknown Source)
      at org.alfresco.repo.web.scripts.links.AbstractLinksWebScript.renderLink(AbstractLinksWebScript.java:221)
      at org.alfresco.repo.web.scripts.links.LinksListGet.executeImpl(LinksListGet.java:121)
      at org.alfresco.repo.web.scripts.links.AbstractLinksWebScript.executeImpl(AbstractLinksWebScript.java:310)
      at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
      ... 28 more

      The call to `personService.getPerson` needs to be wrapped in a try/catch, and if the creator user no longer exists it should be treated as if there was no creator (for which code already exists)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                nburch Nick Burch
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: