Class TransientUserPermissionHelper

java.lang.Object
org.nuxeo.ecm.permissions.TransientUserPermissionHelper

public class TransientUserPermissionHelper extends Object
Since:
8.1
  • Field Details

  • Method Details

    • acquireToken

      @Deprecated public static String acquireToken(String username, DocumentModel doc, String permission)
      Deprecated.
      since 10.3. Use addToken(String) instead.
    • addToken

      public static void addToken(String username)
      Adds a token for the given username.

      Does nothing if username is not a transient username or if a token already exists.

      Since:
      10.3
    • getToken

      public static String getToken(String username)
      Returns the token linked to the given transient username, or null if no token can be found.
      Since:
      10.3
    • revokeToken

      public static void revokeToken(String username, DocumentModel doc)
    • hasOtherPermission

      protected static boolean hasOtherPermission(String username, DocumentModel doc)
      Returns true if the given username has a non-archived ACE on another document than doc, false otherwise.

      Always returns false if the configuration property NuxeoPrincipal.TRANSIENT_USERNAME_UNIQUE_PROP is true.

      Since:
      10.3