[keycloak-dev] 2 Groups with same name?

Stan Silvert ssilvert at redhat.com
Thu Mar 24 14:17:35 EDT 2016


We currently allow more than one group to have the same name.  I realize 
that this is probably due to the fact that groups are hierarchical and 
you might want the same group name at different levels.

However, right now there are no restrictions at all.  You can have as 
many "foo" groups as you like even if they have the same parent. This 
causes a problem in the UI because you can't tell them apart.

Plus, apparently, KeycloakModelUtils.findGroupByPath() will return the 
first group it finds.  If there is more than one group with the same 
path then it might not return the group you are looking for.

It would make our code a lot simpler and less error-prone if we enforced 
that all group names be unique throughout.  But I don't know if that is 
to restrictive for users.  At the very least, two groups should probably 
not have the same path.

Thoughts?

Stan


More information about the keycloak-dev mailing list