1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 10:02:47 -05:00

store device type and ip address on events

This commit is contained in:
Kyle Spearrin
2017-12-15 10:50:06 -05:00
parent 39f6516ca8
commit a9f232746e
11 changed files with 123 additions and 44 deletions

View File

@ -5,6 +5,14 @@ namespace Bit.Core.Models.Data
{
public class EventMessage : IEvent
{
public EventMessage() { }
public EventMessage(CurrentContext currentContext)
{
IpAddress = currentContext.IpAddress;
DeviceType = currentContext.DeviceType;
}
public DateTime Date { get; set; }
public EventType Type { get; set; }
public Guid? UserId { get; set; }
@ -14,5 +22,7 @@ namespace Bit.Core.Models.Data
public Guid? GroupId { get; set; }
public Guid? OrganizationUserId { get; set; }
public Guid? ActingUserId { get; set; }
public DeviceType? DeviceType { get; set; }
public string IpAddress { get; set; }
}
}