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 String
OTHER_DOCUMENT_WITH_PENDING_OR_EFFECTIVE_ACL_QUERY
static String
TRANSIENT_APP_NAME
static String
TRANSIENT_DEVICE_ID
static String
TRANSIENT_PERMISSION
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
acquireToken(String username, DocumentModel doc, String permission)
Deprecated.since 10.3.static void
addToken(String username)
Adds a token for the givenusername
.static String
getToken(String username)
Returns the token linked to the given transientusername
, ornull
if no token can be found.protected static boolean
hasOtherPermission(String username, DocumentModel doc)
Returnstrue
if the givenusername
has a non-archived ACE on another document thandoc
,false
otherwise.static void
revokeToken(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
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 transientusername
, ornull
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)
Returnstrue
if the givenusername
has a non-archived ACE on another document thandoc
,false
otherwise.Always returns
false
if the configuration propertyNuxeoPrincipal.TRANSIENT_USERNAME_UNIQUE_PROP
istrue
.- Since:
- 10.3
-
-