package com.atlassian.bitbucket.mesh.annotation;

import com.atlassian.bitbucket.mesh.auth.ApplicationRole;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @since 1.4
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface RequiresRole {

    /**
     * @return the {@link ApplicationRole} the caller must have to access the annotated method or type
     */
    ApplicationRole value();
}
