LDAP Custom rules and transactional data manager

Ideally, those two need to be written in different posts…

I posted issues on the github page:
@94 & @95

Any ideas how to use transaction data manager in listeners?

Hi, @kbatyrkhan

Matching rules are primarily intended to be applied for newly created users, but they are also applied for existing users and shouldn’t break their login flow. So probably the problem is in your custom rule implementation. Maybe, you should add an additional validation, to check whether a user already exists in Cuba?

The error says that the unique index on SEC_GROUP table has been violated, i.e. you have created 2 user groups having the same name. The strange thing here is that they have a name: Default LDAP role, which is likely supposed to be a Role name. It is hard to say more on this without code example.

You can find out more about working with the Transactional data manager in the documentation. Note that Entity listeners (except for BeforeAttachEntityListener) work within a transaction.

Regards,
Gleb