Package org.nuxeo.ecm.permissions
Class TransientUserPermissionHelper
- java.lang.Object
-
- org.nuxeo.ecm.permissions.TransientUserPermissionHelper
-
public class TransientUserPermissionHelper extends Object
- Since:
- 8.1
-
-
Field Summary
Fields Modifier and Type Field Description static StringOTHER_DOCUMENT_WITH_PENDING_OR_EFFECTIVE_ACL_QUERYstatic StringTRANSIENT_APP_NAMEstatic StringTRANSIENT_DEVICE_IDstatic StringTRANSIENT_PERMISSION
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringacquireToken(String username, DocumentModel doc, String permission)Deprecated.since 10.3.static voidaddToken(String username)Adds a token for the givenusername.static StringgetToken(String username)Returns the token linked to the given transientusername, ornullif no token can be found.protected static booleanhasOtherPermission(String username, DocumentModel doc)Returnstrueif the givenusernamehas a non-archived ACE on another document thandoc,falseotherwise.static voidrevokeToken(String username, DocumentModel doc)
-
-
-
Field Detail
-
OTHER_DOCUMENT_WITH_PENDING_OR_EFFECTIVE_ACL_QUERY
public static final String OTHER_DOCUMENT_WITH_PENDING_OR_EFFECTIVE_ACL_QUERY
- Since:
- 10.3
- See Also:
- Constant Field Values
-
TRANSIENT_APP_NAME
public static final String TRANSIENT_APP_NAME
- Since:
- 10.3
- See Also:
- Constant Field Values
-
TRANSIENT_DEVICE_ID
public static final String TRANSIENT_DEVICE_ID
- Since:
- 10.3
- See Also:
- Constant Field Values
-
TRANSIENT_PERMISSION
public static final String TRANSIENT_PERMISSION
- Since:
- 10.3
- See Also:
- Constant Field Values
-
-
Method Detail
-
acquireToken
@Deprecated public static String acquireToken(String username, DocumentModel doc, String permission)
Deprecated.since 10.3. UseaddToken(String)instead.
-
addToken
public static void addToken(String username)
Adds a token for the givenusername.Does nothing if
usernameis 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 transientusername, ornullif 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)
Returnstrueif the givenusernamehas a non-archived ACE on another document thandoc,falseotherwise.Always returns
falseif the configuration propertyNuxeoPrincipal.TRANSIENT_USERNAME_UNIQUE_PROPistrue.- Since:
- 10.3
-
-