...
You need to update the @DeclareRoles when referencing more roles in your annotationsroles via isCallerInRole(roleName).
Code Block |
---|
@Stateless @DeclareRoles({"committer", "contributor"}) public class OpenSourceProjectBean implements Project { @Resource SessionContext ctx; @RolesAllowed({"committer"}) public String svnCommit(String s) { ctx.isCallerInRole("committer"); // Referencing a Role return s; } @RolesAllowed({"contributor"}) public String submitPatch(String s) { return s; } } |
...