TSK-383: removed InvalidArgumentException from WorkbasketQuery.callerHasPermission()
This commit is contained in:
parent
4bc7b6bad1
commit
ea7ab903d5
|
@ -163,17 +163,14 @@ public interface WorkbasketQuery extends BaseQuery<WorkbasketSummary> {
|
|||
throws InvalidArgumentException, NotAuthorizedException;
|
||||
|
||||
/**
|
||||
* Setting up the permissions for the accessIds of the CurrentUserContext. READ permissions need to be granted,too
|
||||
* by default.<br>
|
||||
* The UserContext-AccessIds and the given permission will throw a Exception if they would be NULL.
|
||||
* Add condition to query if the caller (one of the accessIds of the caller) has the given permission on the
|
||||
* workbasket.
|
||||
*
|
||||
* @return the current query object.
|
||||
* @return the updated query.
|
||||
* @param permission
|
||||
* which should be used for results.
|
||||
* @throws InvalidArgumentException
|
||||
* when permission OR accessIds of the userContext are NULL.
|
||||
* the permission for the query condition.
|
||||
*/
|
||||
WorkbasketQuery callerHasPermission(WorkbasketPermission permission) throws InvalidArgumentException;
|
||||
WorkbasketQuery callerHasPermission(WorkbasketPermission permission);
|
||||
|
||||
/**
|
||||
* Sort the query result by name.
|
||||
|
|
|
@ -361,7 +361,7 @@ public class WorkbasketQueryImpl implements WorkbasketQuery {
|
|||
}
|
||||
|
||||
@Override
|
||||
public WorkbasketQuery callerHasPermission(WorkbasketPermission permission) throws InvalidArgumentException {
|
||||
public WorkbasketQuery callerHasPermission(WorkbasketPermission permission) {
|
||||
this.permission = permission;
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ public class QueryWorkbasketByPermissionAccTest extends AbstractAccTest {
|
|||
groupNames = {"group_1"})
|
||||
@Test
|
||||
public void testQueryAllTransferTargetsForUserAndGroupFromSubject()
|
||||
throws SQLException, NotAuthorizedException, InvalidArgumentException, SystemException {
|
||||
throws SQLException, NotAuthorizedException, SystemException {
|
||||
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
|
||||
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
|
||||
.callerHasPermission(WorkbasketPermission.APPEND)
|
||||
|
@ -138,7 +138,7 @@ public class QueryWorkbasketByPermissionAccTest extends AbstractAccTest {
|
|||
@WithAccessId(userName = "user_1_1")
|
||||
@Test
|
||||
public void testQueryAllAvailableWorkbasketForOpeningForUserAndGroupFromSubject()
|
||||
throws SQLException, NotAuthorizedException, InvalidArgumentException {
|
||||
throws SQLException, NotAuthorizedException {
|
||||
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
|
||||
List<WorkbasketSummary> results = workbasketService.createWorkbasketQuery()
|
||||
.callerHasPermission(WorkbasketPermission.READ)
|
||||
|
|
Loading…
Reference in New Issue