hi jose, here it works without an issue -> please provide the codi startup-log about the configuration you are using.
@ package: please use: javax.enterprise.context regards, gerhard http://www.irian.at Your JSF/JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2012/4/19 José Luis Cetina <[email protected]> > Thanks Gerhard, but i have a problem. > My checkpermision method never get called, i dont know why, i have this: > > *//ANOTATION* > @Stereotype > @Target(value = {ElementType.METHOD, ElementType.FIELD, ElementType.TYPE}) > @Retention(value = RetentionPolicy.RUNTIME) > @Secured(PermissionAccessDecisionVoter.class) > public @interface ModuloPantallaBinding { > ModulosPantallasEnum codigoModulo(); > } > > *//MANAGED BEAN* > @Named > @ViewAccessScoped > @View(IInicio.SeleccionRoles.class) > > @ModuloPantallaBinding(codigoModulo=ModulosPantallasEnum.SELECCION_ROLES_INICIO) > public class SeleccionRolesMBean implements Serializable { > . > . > . > } > > *//Secure class* > import javax.faces.bean.ApplicationScoped; > @ApplicationScoped > public class PermissionAccessDecisionVoter extends > AbstractAccessDecisionVoter implements AccessDecisionVoter{ > . > > protected void checkPermission(InvocationContext ic, Set<SecurityViolation> > violations) { > *ModuloPantallaBinding obj*= > voterContext.getMetaDataFor(ModuloPantallaBinding.class.getName(), > ModuloPantallaBinding.class); > > > } > . > } > > > is correct the package javax.faces.bean.ApplicationScoped > for @ApplicationScoped or have to be: > javax.enterprise.context.ApplicationScoped;??? > > My checkPermission method never get called, but if i use the anottation > @Secure in my: > @Secured(PermissionAccessDecisionVoter.class) > public @Page(name="seleccion_roles") class SeleccionRoles implements > IInicio{} > > it works but the obj always is null. > > Thanks > > > 2012/4/19 Gerhard Petracek <[email protected]> > > > hi jose, > > > > see the description at [1] - it will be added to the wiki soon. > > > > regards, > > gerhard > > > > [1] https://issues.apache.org/jira/browse/EXTCDI-262 > > > > http://www.irian.at > > > > Your JSF/JavaEE powerhouse - > > JavaEE Consulting, Development and > > Courses in English and German > > > > Professional Support for Apache MyFaces > > > > > > > > 2012/4/19 José Luis Cetina <[email protected]> > > > > > Hello somebody know where i can find an example of > > > @Secured and Stereotypes > > > > > > Im triying to work with @Secured and Stereotypes with metadata but i > have > > > some doubts > > > > > > > > > -- > > > ------------------------------------------------------------------- > > > *SCJA. José Luis Cetina* > > > ------------------------------------------------------------------- > > > > > > > > > -- > ------------------------------------------------------------------- > *SCJA. José Luis Cetina* > ------------------------------------------------------------------- >

