Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-13754

HibernateGroupManager.hasExternalMembership() is slow for group with thousands of users

    XMLWordPrintable

Details

    Description

      The ConfluenceGroupJoiningAuthenticator calls getGroupManager().hasMembership which in turn calls hasExternalMembership(). This causes loading of users of that group, which can be extremely slow if the group has thousands of users.

      If you're writing a custom authenticator, the workaround here is to use something like this instead:

       boolean permission = permissionManager.hasPermission(getUserAccessor().getUser(username),Permission.VIEW, PermissionManager.TARGET_APPLICATION);
      

      Check the source attached here.

      Attachments

        1. bug.gif
          0.3 kB
          Jeremy Largman
        2. bug.gif
          0.3 kB
          Jeremy Largman
        3. bug.gif
          0.3 kB
          Jeremy Largman
        4. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        5. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        6. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        7. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        8. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        9. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        10. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        11. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        12. bullet_creme.gif
          0.1 kB
          Jeremy Largman
        13. ConfluenceGroupJoiningAuthenticator.class
          3 kB
          Jeremy Largman
        14. ConfluenceGroupJoiningAuthenticator.java
          4 kB
          Jeremy Largman
        15. linkext7.gif
          0.2 kB
          Jeremy Largman
        16. linkext7.gif
          0.2 kB
          Jeremy Largman
        17. linkext7.gif
          0.2 kB
          Jeremy Largman
        18. linkext7.gif
          0.2 kB
          Jeremy Largman
        19. linkext7.gif
          0.2 kB
          Jeremy Largman
        20. linkext7.gif
          0.2 kB
          Jeremy Largman
        21. priority_critical.gif
          0.2 kB
          Jeremy Largman
        22. priority_major.gif
          0.1 kB
          Jeremy Largman
        23. priority_major.gif
          0.1 kB
          Jeremy Largman
        24. spacer.gif
          0.0 kB
          Jeremy Largman
        25. spacer.gif
          0.0 kB
          Jeremy Largman
        26. spacer.gif
          0.0 kB
          Jeremy Largman
        27. status_open.gif
          0.3 kB
          Jeremy Largman
        28. status_open.gif
          0.3 kB
          Jeremy Largman
        29. status_open.gif
          0.3 kB
          Jeremy Largman

        Issue Links

          Activity

            People

              dave@atlassian.com dave (Inactive)
              jlargman Jeremy Largman
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: