Class NotAuthorizedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- pro.taskana.common.api.exceptions.TaskanaException
-
- pro.taskana.common.api.exceptions.NotAuthorizedException
-
- All Implemented Interfaces:
Serializable
public class NotAuthorizedException extends TaskanaException
This exception is thrown when the current user is not in a certain role it is supposed to be.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NotAuthorizedException(String currentUserId, TaskanaRole... roles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCurrentUserId()TaskanaRole[]getRoles()-
Methods inherited from class pro.taskana.common.api.exceptions.TaskanaException
ensureNullIsHandled, getErrorCode, toString
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Field Detail
-
ERROR_KEY
public static final String ERROR_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NotAuthorizedException
public NotAuthorizedException(String currentUserId, TaskanaRole... roles)
-
-
Method Detail
-
getRoles
public TaskanaRole[] getRoles()
-
getCurrentUserId
public String getCurrentUserId()
-
-