TSK-1721: reduced WithAccessId and WithAccessIds
This commit is contained in:
parent
8eb8f1f44d
commit
4bf0479a81
|
|
@ -39,6 +39,7 @@ import org.opentest4j.TestAbortedException;
|
||||||
import pro.taskana.common.api.exceptions.SystemException;
|
import pro.taskana.common.api.exceptions.SystemException;
|
||||||
import pro.taskana.common.api.security.GroupPrincipal;
|
import pro.taskana.common.api.security.GroupPrincipal;
|
||||||
import pro.taskana.common.api.security.UserPrincipal;
|
import pro.taskana.common.api.security.UserPrincipal;
|
||||||
|
import pro.taskana.common.test.security.WithAccessId.WithAccessIds;
|
||||||
|
|
||||||
/** Runner for integration tests that enables JAAS subject. */
|
/** Runner for integration tests that enables JAAS subject. */
|
||||||
public class JaasExtension implements InvocationInterceptor, TestTemplateInvocationContextProvider {
|
public class JaasExtension implements InvocationInterceptor, TestTemplateInvocationContextProvider {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import pro.taskana.common.test.security.WithAccessId.WithAccessIds;
|
||||||
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
|
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||||
@Repeatable(WithAccessIds.class)
|
@Repeatable(WithAccessIds.class)
|
||||||
|
|
@ -14,4 +16,10 @@ public @interface WithAccessId {
|
||||||
String user();
|
String user();
|
||||||
|
|
||||||
String[] groups() default {};
|
String[] groups() default {};
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@interface WithAccessIds {
|
||||||
|
WithAccessId[] value();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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();
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue