public class TransientUserPermissionHelper extends Object
| Modifier and Type | Field and Description | 
|---|---|
static String | 
OTHER_DOCUMENT_WITH_PENDING_OR_EFFECTIVE_ACL_QUERY  | 
static String | 
TRANSIENT_APP_NAME  | 
static String | 
TRANSIENT_DEVICE_ID  | 
static String | 
TRANSIENT_PERMISSION  | 
| Modifier and Type | Method and Description | 
|---|---|
static String | 
acquireToken(String username,
            DocumentModel doc,
            String permission)
Deprecated. 
 
since 10.3. Use  
addToken(String) instead. | 
static void | 
addToken(String username)
Adds a token for the given  
username. | 
static String | 
getToken(String username)
Returns the token linked to the given transient  
username, or null if no token can be found. | 
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. | 
static void | 
revokeToken(String username,
           DocumentModel doc)  | 
public static final String OTHER_DOCUMENT_WITH_PENDING_OR_EFFECTIVE_ACL_QUERY
public static final String TRANSIENT_APP_NAME
public static final String TRANSIENT_DEVICE_ID
public static final String TRANSIENT_PERMISSION
@Deprecated public static String acquireToken(String username, DocumentModel doc, String permission)
addToken(String) instead.public static void addToken(String username)
username.
 
 Does nothing if username is not a transient username or if a token already exists.
public static String getToken(String username)
username, or null if no token can be found.public static void revokeToken(String username, DocumentModel doc)
protected static boolean hasOtherPermission(String username, DocumentModel doc)
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.
Copyright © 2019 Nuxeo. All rights reserved.