001    package org.codehaus.groovy.grails.plugins.springsecurity;
002    
003    import java.lang.annotation.Documented;
004    import java.lang.annotation.ElementType;
005    import java.lang.annotation.Inherited;
006    import java.lang.annotation.Retention;
007    import java.lang.annotation.RetentionPolicy;
008    import java.lang.annotation.Target;
009    
010    /**
011     * Annotation for Controllers at the class level or per-action, defining what roles
012     * are required for the entire controller or action.
013     */
014    @Target({ElementType.FIELD, ElementType.TYPE})
015    @Retention(RetentionPolicy.RUNTIME)
016    @Inherited
017    @Documented
018    public @interface Secured {
019    
020            /**
021             * Defines the security configuration attributes (e.g. ROLE_USER, ROLE_ADMIN, etc.)
022             * @return  the names of the roles
023             */
024       String[] value();
025    }