zerodine/MongoDBAclBundle — pull request #37 by cristiangraz (2014-12-12 18:27:00+00:00)
Title: Adds the ability to update ACEs when username changes

This commit adds an updateUserSecurityIdentity method, which is needed when a user updates their username. In my case, the username is just an alias to an email address, so this was necessary if the user happens to update their email address. See this issue: https://github.com/symfony/symfony/issues/5787 as well as this commit: https://github.com/symfony/symfony/commit/8d39213f4cca19466f84a5656a199eee98602ab1

A deleteAceBySecurityIdentity was also added. This allows you to pass in a UserSecurityIdentity object and delete all ACEs associated with it. This is useful when editing a user's permissions via checkboxes, for example, and being able to simply delete all their ACEs and recreate them on edit.