Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-22942

isSuperAdmin is implemented in many different ways

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.1.0
    • None
    • Unknown

    Description

      Across our codebase, we have a dozen way to check if a user is superadmin

      • com.xpn.xwiki.internal.plugin.rightsmanager.UserIterator#isSuperAdmi
      • com.xpn.xwiki.user.api.XWikiRightService#isSuperAdmin
      • com.xpn.xwiki.user.impl.xwiki.AbstractXWikiAuthService#isSuperAdmin
      • com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl#isSuperAdmin
      • com.xpn.xwiki.internal.template.InternalTemplateManager.FilesystemTemplateContent#isPrivileged
      • com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl#isSuperAdmin
      • com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl#isSuperAdminOrProgramming
      • org.xwiki.test.checker.internal.ProgrammingRightCheckerAuthorizationManager#check(org.xwiki.model.reference.DocumentReference, com.xpn.xwiki.doc.XWikiDocument)
      • org.xwiki.user.internal.document.AbstractUserReferenceResolver#isSuperAdmin

      It would be better to have a single source of truth, especially as some implementations might ne be aligned with each other

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mleduc Manuel Leduc
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: