Fredrik Hörte
unread,Aug 2, 2012, 4:35:45 PM8/2/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
  to dropwiz...@googlegroups.com
Is there any native support for having different user roles when using @Auth.
E.g. if I have BETA_USER, REGULAR_USER, ADMIN_USER and I want different methods to be accessible for different Users depending on their role. Have anybody an example for such implementation using dw?
Something like bellow (though I know @Auth doesn't take "roles" as bellow) but looking for smth similar.
public List<User> getUsers(@Auth(roles="ADMIN, REGULAR, BETA") User user, @QueryParam("limit") @DefaultValue("20") int limit, @QueryParam("offset") @DefaultValue("0") int offset) {
        return userDAO.findAll(limit, offset);
    }
thanks!