mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 21:45:43 +01:00
improve modification events to pass the item before it was modified to the subscriber
This commit is contained in:
@@ -222,13 +222,14 @@ public class DefaultGroupManager extends AbstractGroupManager
|
||||
|
||||
String name = group.getName();
|
||||
|
||||
if (groupDAO.contains(name))
|
||||
Group notModified = groupDAO.get(name);
|
||||
if (notModified != null)
|
||||
{
|
||||
removeDuplicateMembers(group);
|
||||
fireEvent(new GroupModificationEvent(group, notModified, HandlerEvent.BEFORE_MODIFY));
|
||||
group.setLastModified(System.currentTimeMillis());
|
||||
fireEvent(group, HandlerEvent.BEFORE_MODIFY);
|
||||
groupDAO.modify(group);
|
||||
fireEvent(group, HandlerEvent.MODIFY);
|
||||
fireEvent(new GroupModificationEvent(group, notModified, HandlerEvent.MODIFY));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user