Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25910

Use NuxeoPrincipal instead of Principal in most APIs

    XMLWordPrintable

    Details

    • Type: Clean up
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.3
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      The general upgrade rule is the Nuxeo code should not deal with a java.security.Principal anymore (except for internal authentication-related classes).

      API changes

      NuxeoPrincipal is now used instead of Principal in the methods and constructors for these classes:

      • CoreSession
      • DocumentEventContext
      • EventContext
      • EventContextImpl
      • InlineEventContext
      • OperationContext
      • QueryFilter
      • SQLQuery.Transformer
      • SecurityPolicy
      • SecurityPolicy.QueryTransformer
      • SecurityService
      • TrashService
      • UnboundEventContext
      • UserWorkspaceService
      • WebContext

      Removed APIs

      These APIs were previously deprecated or internal and have been removed.

      • CoreInstance.getInstance()
      • CoreInstance.getNumberOfSessions()
      • CoreInstance.getRegistrationInfos()
      • CoreInstance.openCoreSession(repositoryName, Map context)
      • CoreInstance.openCoreSession(repositoryName, Principal principal)
      • DetachedNuxeoPrincipal
      • SimplePrincipal (use UserPrincipal instead)
      Show
      The general upgrade rule is the Nuxeo code should not deal with a java.security.Principal anymore (except for internal authentication-related classes). API changes NuxeoPrincipal is now used instead of Principal in the methods and constructors for these classes: CoreSession DocumentEventContext EventContext EventContextImpl InlineEventContext OperationContext QueryFilter SQLQuery.Transformer SecurityPolicy SecurityPolicy.QueryTransformer SecurityService TrashService UnboundEventContext UserWorkspaceService WebContext Removed APIs These APIs were previously deprecated or internal and have been removed. CoreInstance.getInstance() CoreInstance.getNumberOfSessions() CoreInstance.getRegistrationInfos() CoreInstance.openCoreSession(repositoryName, Map context) CoreInstance.openCoreSession(repositoryName, Principal principal) DetachedNuxeoPrincipal SimplePrincipal (use UserPrincipal instead)
    • Sprint:
      nxFG 10.3.7
    • Story Points:
      8

      Description

      A lot of APIs currently use Principal when all they expect is actually a NuxeoPrincipal (often using casts).

      These APIs should be cleaned up to express that they use/require a NuxeoPrincipal.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day
                  1d