Default role and group restrictions


Some time ago, when my app ran on 6.10, I implemented a restricted role named “default” and set it as default role, following the Local Admin guide

Now, on platform version 7.2, I see that when a new user is created, the “default” role is not added to the new user, unless the user’s creator is an Administrator (with permissions to see the “default” role). The creation of a new user by other user that belongs to a group with a rule that restrict access to that “default” role, does not add this role.

That “default” role is important for me because it has a “denying” behavior, so if it is missing, then the user has all the permissions.

I don’t think it is related, but I set the following properties: = 1 = true = false

So, is there any way to keep the previous behavior or workaround ? Or should I implement something new ? I don’t like to rewrite my roles.

Thanks !!


Create the Department Administrator role for local administrators according to new documentation version.

Ok, thanks, I’ll take a look at it but I still need that role at this moment, otherwise I should retest everything. Is it possible to add that role to the User on the persist event or after commit event ?


Yes, you can substitute UserEntityListener bean implementation and override the following method

public void onBeforeInsert(User entity, EntityManager entityManager) {
    super.onBeforeInsert(entity, entityManager)
1 Like

Thanks Natalia, it worked !

1 Like