V7: Send notifications for changes in permissions (#5306)

V7: Send notifications for changes in permissions
This commit is contained in:
Sebastiaan Janssen
2019-04-22 13:21:03 +02:00
committed by GitHub
@@ -100,7 +100,19 @@ namespace Umbraco.Web.Strategies
//Send notifications for the copy action
ContentService.Copied += (sender, args) => applicationContext.Services.NotificationService.SendNotification(
args.Original, ActionCopy.Instance, applicationContext);
}
//Send notifications for the permissions action
UserService.UserGroupPermissionsAssigned += (sender, args) =>
{
var entities = applicationContext.Services.ContentService.GetByIds(args.SavedEntities.Select(e => e.EntityId));
foreach(var entity in entities)
{
applicationContext.Services.NotificationService.SendNotification(
entity, ActionRights.Instance, applicationContext
);
}
};
}
}
}