Wrong condition in Access Group Constraint on Role Type

The constraint wizard generates a wrong constraint validation for the Role type using Groovy script:
For example to add a constraint to allow an access group to create any role having any type different than Super, the constraint wizard generates the following:

{E}.type != value(com.haulmont.cuba.security.entity.RoleType.class, 'SUPER')

This constraint does not work because it should be as follow:

{E}.type != com.haulmont.cuba.security.entity.RoleType.SUPER


Wrong role type constraint

Right role type constraint

The issue was fixed in the platform 6.5.2 (see the linked YouTrack issue). Now wizard generates constraints with the “parse” method and it works OK.

{E}.type != parse(com.haulmont.cuba.security.entity.RoleType.class, 'SUPER')

Update your project or correct the generated script manually.

:ticket: See the following issue in our bug tracker: