enonic/cms-ce — pull request #456 by vfi (2012-03-05 11:58:51+00:00)
Title: 5.0

B-02695 Accounts - Avoid cycles in account memberships

Currently it's possible to have cycles in the accounts memberships, i.e. a group may be added as member of itself. This should not be allowed.
The list of members should be filtered to avoid showing itself in the member list in the UI. And it should also be validated on the server side when saving changes.

Fix also code in AccountModelTranslator.toAModel( GroupEntity ) , so that only one level of members is generated and avoid infinite recursion (in case there would be cycles for some reason).