-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
2.1
-
- standalone version
- JDK 5
- Linux 2.6.26-2-686
-
7
-
Severity 2 - Major
-
9
-
When i delete an user then the related alias names are not removed. (database table: cwd_application_alias)
As workaround i create a crowd plugin with a listener, which cleans up the alias names after removing the user.
public class RemoveUserAliasListener { private static final Logger logger = Logger.getLogger(RemoveUserAliasListener.class); private AliasManager aliasManager; private GlobalMMSManager globalMMSManager; @EventListener public void removeAlias(UserDeletedEvent event) { if (StringUtils.isNotBlank(event.getUsername())) { try { aliasManager.removeAlias(globalMMSManager.getCrowdCAS(), event.getUsername()); } catch (Exception e) { logger.warn(e.getMessage()); } } } public void setAliasManager(AliasManager aliasManager) { this.aliasManager = aliasManager; } public void setGlobalMMSManager(GlobalMMSManager globalMMSManager) { this.globalMMSManager = globalMMSManager; } }