TSK-328: Add userId to NotAuthorizedException
This commit is contained in:
parent
8dc00106d0
commit
f4c29855d8
|
@ -1,13 +1,15 @@
|
|||
package pro.taskana.exceptions;
|
||||
|
||||
import pro.taskana.security.CurrentUserContext;
|
||||
|
||||
/**
|
||||
* This exception is used to communicate a not authorized user.
|
||||
*/
|
||||
public class NotAuthorizedException extends TaskanaException {
|
||||
|
||||
public NotAuthorizedException(String msg) {
|
||||
super(msg);
|
||||
super(msg + " - [CURRENT USER: {'" + CurrentUserContext.getUserid() + "'}]");
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 21235L;
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ public class CreateWorkbasketAccTest extends AbstractAccTest {
|
|||
workbasket.setType(WorkbasketType.GROUP);
|
||||
workbasket.setOrgLevel1("company");
|
||||
workbasketService.createWorkbasket(workbasket);
|
||||
|
||||
fail("NotAuthorizedException should have been thrown");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package pro.taskana.rest;
|
||||
|
||||
import java.util.List;
|
||||
|
|
Loading…
Reference in New Issue