[jboss-user] [JBoss Portal] - Re: Setting user's roles doesn't trigger Hibernate PreInsert

matallen do-not-reply at jboss.com
Mon Jun 1 17:17:32 EDT 2009

Hi Johnny,

I have to say I've not used our method to audit log the portal events before. Previously I took the extend the class and add logging approach:-

So in order to audit the role events you could extend the IdentityRoleBean class of portal, and override the method:

  |    @Override
  |    public void assignRoles(User user, List<String> roles) throws IllegalArgumentException, IdentityException{
  |       auditService.log("roles ["+ displayRoles(roles)+"] assigned to user "+ user.getUsername(), getCurrentUser());
  |       super.assignRoles(user, roles);
  | }

then for account creation use UserAdministrationBean etc...

I realise this isn't quite the answer you were looking for but it's one that I know works.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234576#4234576

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234576

More information about the jboss-user mailing list