It's usually best if you reply to previous messages (keeping the same subject) so your questions show up as the same thread in archives. It's difficult for anyone to know what the message below relates to if there's no previous context.
On Thu, Sep 17, 2009 at 10:54 AM, measwel <marek_karczew...@yahoo.com.au>wrote: > > In addition, here is the code I use for setting the roles (in > preferencesAction). Its coupled to a checkbox. Preferences is an embedded > object in User stating his preferences (bit fields) > > // set roles according to preferences > if (user.getPreferences().getWantsDogs() == true && > !getRequest().isUserInRole(Constants.DOGS_ROLE)) { > user.addRole(roleManager.getRole(Constants.DOGS_ROLE)); > } else if (user.getPreferences().getWantsDogs() == false && > getRequest().isUserInRole(Constants.DOGS_ROLE)){ > //remove dogs role from user > user.removeRole(roleManager.getRole(Constants.DOGS_ROLE)); > } > > userManager.saveUser(user); // save the related user and his > preferences > -- > View this message in context: > http://www.nabble.com/extension-of-appfuse-roles-not-testing-correctly-tp25491920s2369p25491930.html > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > For additional commands, e-mail: users-h...@appfuse.dev.java.net > >