TSK-1721: reduced WithAccessId and WithAccessIds

This commit is contained in:
Mustapha Zorgati 2021-08-26 23:02:12 +02:00
parent 8eb8f1f44d
commit 4bf0479a81
3 changed files with 9 additions and 12 deletions

View File

@ -39,6 +39,7 @@ import org.opentest4j.TestAbortedException;
import pro.taskana.common.api.exceptions.SystemException;
import pro.taskana.common.api.security.GroupPrincipal;
import pro.taskana.common.api.security.UserPrincipal;
import pro.taskana.common.test.security.WithAccessId.WithAccessIds;
/** Runner for integration tests that enables JAAS subject. */
public class JaasExtension implements InvocationInterceptor, TestTemplateInvocationContextProvider {

View File

@ -6,6 +6,8 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import pro.taskana.common.test.security.WithAccessId.WithAccessIds;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
@Repeatable(WithAccessIds.class)
@ -14,4 +16,10 @@ public @interface WithAccessId {
String user();
String[] groups() default {};
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@interface WithAccessIds {
WithAccessId[] value();
}
}

View File

@ -1,12 +0,0 @@
package pro.taskana.common.test.security;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface WithAccessIds {
WithAccessId[] value();
}