com.atlassian.confluence.core.InsufficientPrivilegeException: User [example] does not have the required privileges.

Atlassian JIRA | Jeison Spaniol [Atlassian] | 3 years ago
  1. 0

    h4. Scenario After using the Site Importer tool to restore a Confluence backup, users are presented with the error below when trying to create new users: {noformat} Oops - an error has occurred (https://example.atlassian.net/wiki/)System Error A system error has occurred — our apologies! For immediate troubleshooting, consult our knowledge base (http://confluence.atlassian.com/display/CONFKB/Confluence+Knowledge+Base+Home) for a solution. If you would like to receive support from Atlassian's support team, ask your Confluence administrator (https://example.atlassian.net/wiki/contactadministrators.action) to create a support issue on Atlassian's support system (http://support.atlassian.com/) with the following information: a description of your problem and what you were doing at the time it occurred a copy of the error and system information found below a copy of the application logs (if possible). Your Confluence administrator can use the support request form (https://example.atlassian.net/wiki/admin/raisesupportrequest.action) to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… (https://example.atlassian.net/wiki/) Cause com.atlassian.confluence.core.InsufficientPrivilegeException: User [example] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:169) {noformat} h4. Cause Apparently the import overwrites the groups in OnDemand, and the *users* group gets deleted in case it is not present in the backup. With the absence of that group, Confluence is unable to include new users to it and throws the error above. h4. Workaround Create the *users* group manually after the import

    Atlassian JIRA | 3 years ago | Jeison Spaniol [Atlassian]
    com.atlassian.confluence.core.InsufficientPrivilegeException: User [example] does not have the required privileges.
  2. 0

    h4. Scenario After using the Site Importer tool to restore a Confluence backup, users are presented with the error below when trying to create new users: {noformat} Oops - an error has occurred (https://example.atlassian.net/wiki/)System Error A system error has occurred — our apologies! For immediate troubleshooting, consult our knowledge base (http://confluence.atlassian.com/display/CONFKB/Confluence+Knowledge+Base+Home) for a solution. If you would like to receive support from Atlassian's support team, ask your Confluence administrator (https://example.atlassian.net/wiki/contactadministrators.action) to create a support issue on Atlassian's support system (http://support.atlassian.com/) with the following information: a description of your problem and what you were doing at the time it occurred a copy of the error and system information found below a copy of the application logs (if possible). Your Confluence administrator can use the support request form (https://example.atlassian.net/wiki/admin/raisesupportrequest.action) to create a support ticket which will include this information. We will respond as promptly as possible. Thank you! Return to site homepage… (https://example.atlassian.net/wiki/) Cause com.atlassian.confluence.core.InsufficientPrivilegeException: User [example] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:169) {noformat} h4. Cause Apparently the import overwrites the groups in OnDemand, and the *users* group gets deleted in case it is not present in the backup. With the absence of that group, Confluence is unable to include new users to it and throws the error above. h4. Workaround Create the *users* group manually after the import

    Atlassian JIRA | 3 years ago | Jeison Spaniol [Atlassian]
    com.atlassian.confluence.core.InsufficientPrivilegeException: User [example] does not have the required privileges.
  3. 0

    Despite that running SnipSnap import as a Confluence administrator, Confluence treats the admin user as anonymous due to a wrong context used. The error encountered is: {noformat} 2010-02-24 15:51:17,736 ERROR [Importing data task] [core.task.longrunning.AbstractLongRunningTask] runInternal Failure during import -- referer: http://localhost:25555/admin/snipsnapimport-start.action | url: /admin/snipsnapimport.action | userName: admin | action: snipsnapimport com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy28.addMembership(Unknown Source) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUser(SnipSnapImporter.java:217) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUsers(SnipSnapImporter.java:197) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importAll(SnipSnapImporter.java:171) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.doImport(SnipSnapImporter.java:112) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:45) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:595) {noformat}

    Atlassian JIRA | 7 years ago | Roy Hartono [Atlassian]
    com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    {noformat} 2010-02-24 15:51:17,736 ERROR [Importing data task] [core.task.longrunning.AbstractLongRunningTask] runInternal Failure during import -- referer: http://localhost:25555/admin/snipsnapimport-start.action | url: /admin/snipsnapimport.action | userName: admin | action: snipsnapimport com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges. at com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy28.addMembership(Unknown Source) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUser(SnipSnapImporter.java:217) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importUsers(SnipSnapImporter.java:197) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.importAll(SnipSnapImporter.java:171) at com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter.doImport(SnipSnapImporter.java:112) at com.atlassian.confluence.importexport.DefaultImportExportManager.importAs(DefaultImportExportManager.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy65.importAs(Unknown Source) at com.atlassian.confluence.importexport.actions.ImportLongRunningTask.runInternal(ImportLongRunningTask.java:45) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:21) at java.lang.Thread.run(Thread.java:595) {noformat} Current user appears to be not set correctly, causing permission check to fail when an admin is trying to import snipsnap users and groups. The hack solution is to include: AuthenticatedUserThreadLocal.setUser(context.getCurrentUser()); in {{com.atlassian.confluence.importexport.impl.snipsnap.SnipSnapImporter#doImport()}}.

    Atlassian JIRA | 7 years ago | Roy Hartono [Atlassian]
    com.atlassian.confluence.core.InsufficientPrivilegeException: User [Anonymous] does not have the required privileges.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.confluence.core.InsufficientPrivilegeException

      User [example] does not have the required privileges.

      at com.atlassian.confluence.user.DefaultUserAccessor.addMembership()
    2. com.atlassian.confluence
      DefaultUserAccessor.addMembership
      1. com.atlassian.confluence.user.DefaultUserAccessor.addMembership(DefaultUserAccessor.java:169)
      1 frame