From 200b8a02120fb7bc73e8913a4230c4595b75e3fb Mon Sep 17 00:00:00 2001 From: MaksimChegulov Date: Tue, 1 Feb 2022 12:11:19 +0300 Subject: [PATCH] AuditTrail: project reconstruction --- .../Attributes/EventAttribute.cs | 17 ++ .../Mappers/AuditActionMapper.cs | 3 +- .../ASC.AuditTrail/{ => Models}/AuditEvent.cs | 3 +- .../ASC.AuditTrail/Models/AuditEventQuery.cs | 10 + .../ASC.AuditTrail/{ => Models}/BaseEvent.cs | 22 +- .../ASC.AuditTrail/{ => Models}/LoginEvent.cs | 2 +- .../ASC.AuditTrail/Models/LoginEventQuery.cs | 11 + .../Models/Profiles/AuditEventProfile.cs | 7 + .../Models/Profiles/LoginEventProfile.cs | 14 + .../AuditEventsRepository.cs | 287 +++++++++--------- .../LoginEventsRepository.cs | 107 +++---- 11 files changed, 264 insertions(+), 219 deletions(-) create mode 100644 common/services/ASC.AuditTrail/Attributes/EventAttribute.cs rename common/services/ASC.AuditTrail/{ => Models}/AuditEvent.cs (96%) create mode 100644 common/services/ASC.AuditTrail/Models/AuditEventQuery.cs rename common/services/ASC.AuditTrail/{ => Models}/BaseEvent.cs (88%) rename common/services/ASC.AuditTrail/{ => Models}/LoginEvent.cs (98%) create mode 100644 common/services/ASC.AuditTrail/Models/LoginEventQuery.cs create mode 100644 common/services/ASC.AuditTrail/Models/Profiles/AuditEventProfile.cs create mode 100644 common/services/ASC.AuditTrail/Models/Profiles/LoginEventProfile.cs rename common/services/ASC.AuditTrail/{ => Repositories}/AuditEventsRepository.cs (92%) rename common/services/ASC.AuditTrail/{ => Repositories}/LoginEventsRepository.cs (98%) diff --git a/common/services/ASC.AuditTrail/Attributes/EventAttribute.cs b/common/services/ASC.AuditTrail/Attributes/EventAttribute.cs new file mode 100644 index 0000000000..a805f832fd --- /dev/null +++ b/common/services/ASC.AuditTrail/Attributes/EventAttribute.cs @@ -0,0 +1,17 @@ +using System; + +namespace ASC.AuditTrail.Attributes +{ + [AttributeUsage(AttributeTargets.Property)] + public class EventAttribute : Attribute + { + public string Resource { get; private set; } + public int Order { get; private set; } + + public EventAttribute(string resource, int order = 0) + { + Resource = resource; + Order = order; + } + } +} diff --git a/common/services/ASC.AuditTrail/Mappers/AuditActionMapper.cs b/common/services/ASC.AuditTrail/Mappers/AuditActionMapper.cs index 2fde7b959c..bd76781d76 100644 --- a/common/services/ASC.AuditTrail/Mappers/AuditActionMapper.cs +++ b/common/services/ASC.AuditTrail/Mappers/AuditActionMapper.cs @@ -26,8 +26,9 @@ using System; using System.Collections.Generic; -using System.Linq; +using System.Linq; +using ASC.AuditTrail.Models; using ASC.Common; using ASC.Common.Logging; using ASC.MessagingSystem; diff --git a/common/services/ASC.AuditTrail/AuditEvent.cs b/common/services/ASC.AuditTrail/Models/AuditEvent.cs similarity index 96% rename from common/services/ASC.AuditTrail/AuditEvent.cs rename to common/services/ASC.AuditTrail/Models/AuditEvent.cs index 27b1910bd1..f0bf43361f 100644 --- a/common/services/ASC.AuditTrail/AuditEvent.cs +++ b/common/services/ASC.AuditTrail/Models/AuditEvent.cs @@ -25,8 +25,9 @@ using ASC.MessagingSystem; +using ASC.AuditTrail.Attributes; -namespace ASC.AuditTrail +namespace ASC.AuditTrail.Models { public class AuditEvent : BaseEvent { diff --git a/common/services/ASC.AuditTrail/Models/AuditEventQuery.cs b/common/services/ASC.AuditTrail/Models/AuditEventQuery.cs new file mode 100644 index 0000000000..766d771bed --- /dev/null +++ b/common/services/ASC.AuditTrail/Models/AuditEventQuery.cs @@ -0,0 +1,10 @@ +using ASC.Core.Common.EF; + +namespace ASC.AuditTrail.Models +{ + public class AuditEventQuery + { + public Core.Common.EF.Model.AuditEvent AuditEvent { get; set; } + public User User { get; set; } + } +} diff --git a/common/services/ASC.AuditTrail/BaseEvent.cs b/common/services/ASC.AuditTrail/Models/BaseEvent.cs similarity index 88% rename from common/services/ASC.AuditTrail/BaseEvent.cs rename to common/services/ASC.AuditTrail/Models/BaseEvent.cs index 29994afe13..98f8e441ba 100644 --- a/common/services/ASC.AuditTrail/BaseEvent.cs +++ b/common/services/ASC.AuditTrail/Models/BaseEvent.cs @@ -29,11 +29,13 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Reflection; - +using System.Reflection; + +using ASC.AuditTrail.Attributes; + using CsvHelper.Configuration; -namespace ASC.AuditTrail +namespace ASC.AuditTrail.Models { public class BaseEvent { @@ -82,18 +84,4 @@ namespace ASC.AuditTrail } } } - - [AttributeUsage(AttributeTargets.Property)] - internal class EventAttribute : Attribute - { - public string Resource { get; private set; } - - public int Order { get; private set; } - - public EventAttribute(string resource, int order = 0) - { - Resource = resource; - Order = order; - } - } } diff --git a/common/services/ASC.AuditTrail/LoginEvent.cs b/common/services/ASC.AuditTrail/Models/LoginEvent.cs similarity index 98% rename from common/services/ASC.AuditTrail/LoginEvent.cs rename to common/services/ASC.AuditTrail/Models/LoginEvent.cs index bf95bd1139..0529014c02 100644 --- a/common/services/ASC.AuditTrail/LoginEvent.cs +++ b/common/services/ASC.AuditTrail/Models/LoginEvent.cs @@ -26,7 +26,7 @@ -namespace ASC.AuditTrail +namespace ASC.AuditTrail.Models { public class LoginEvent : BaseEvent { diff --git a/common/services/ASC.AuditTrail/Models/LoginEventQuery.cs b/common/services/ASC.AuditTrail/Models/LoginEventQuery.cs new file mode 100644 index 0000000000..778d35e93b --- /dev/null +++ b/common/services/ASC.AuditTrail/Models/LoginEventQuery.cs @@ -0,0 +1,11 @@ +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; + +namespace ASC.AuditTrail.Models +{ + public class LoginEventQuery + { + public LoginEvents LoginEvents { get; set; } + public User User { get; set; } + } +} diff --git a/common/services/ASC.AuditTrail/Models/Profiles/AuditEventProfile.cs b/common/services/ASC.AuditTrail/Models/Profiles/AuditEventProfile.cs new file mode 100644 index 0000000000..6f6a379df3 --- /dev/null +++ b/common/services/ASC.AuditTrail/Models/Profiles/AuditEventProfile.cs @@ -0,0 +1,7 @@ +namespace ASC.AuditTrail.Models.Profiles +{ + public class AuditEventProfile + { + + } +} diff --git a/common/services/ASC.AuditTrail/Models/Profiles/LoginEventProfile.cs b/common/services/ASC.AuditTrail/Models/Profiles/LoginEventProfile.cs new file mode 100644 index 0000000000..90970bf863 --- /dev/null +++ b/common/services/ASC.AuditTrail/Models/Profiles/LoginEventProfile.cs @@ -0,0 +1,14 @@ +using ASC.AuditTrail.Data; + +using AutoMapper; + +namespace ASC.AuditTrail.Models.Profiles +{ + public class LoginEventProfile : Profile + { + public LoginEventProfile() + { + CreateMap(); + } + } +} diff --git a/common/services/ASC.AuditTrail/AuditEventsRepository.cs b/common/services/ASC.AuditTrail/Repositories/AuditEventsRepository.cs similarity index 92% rename from common/services/ASC.AuditTrail/AuditEventsRepository.cs rename to common/services/ASC.AuditTrail/Repositories/AuditEventsRepository.cs index 877bde344c..0f6076f5ff 100644 --- a/common/services/ASC.AuditTrail/AuditEventsRepository.cs +++ b/common/services/ASC.AuditTrail/Repositories/AuditEventsRepository.cs @@ -1,147 +1,142 @@ -/* - * - * (c) Copyright Ascensio System Limited 2010-2018 - * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that - * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. - * - * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR - * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 � 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 � 3(e) we decline to grant you any rights under trademark law for use of our trademarks. - * -*/ - - -using System; -using System.Collections.Generic; -using System.Linq; - -using ASC.AuditTrail.Mappers; -using ASC.Common; -using ASC.Core.Common.EF; -using ASC.Core.Common.EF.Context; -using ASC.Core.Users; -using ASC.MessagingSystem; - -using Newtonsoft.Json; - -namespace ASC.AuditTrail -{ - [Scope] - public class AuditEventsRepository - { - private AuditTrailContext AuditTrailContext => _lazyAuditTrailContext.Value; - - private readonly MessageTarget _messageTarget; - private readonly UserFormatter _userFormatter; - private readonly Lazy _lazyAuditTrailContext; - private readonly AuditActionMapper _auditActionMapper; - - public AuditEventsRepository( - MessageTarget messageTarget, - UserFormatter userFormatter, - DbContextManager dbContextManager, - AuditActionMapper auditActionMapper) - { - _messageTarget = messageTarget; - _userFormatter = userFormatter; - _lazyAuditTrailContext = new Lazy(() => dbContextManager.Value ); - _auditActionMapper = auditActionMapper; - } - - public IEnumerable GetLast(int tenant, int chunk) => Get(tenant, null, null, chunk); - - public IEnumerable Get(int tenant, DateTime from, DateTime to) => Get(tenant, from, to, null); - - private IEnumerable Get(int tenant, DateTime? fromDate, DateTime? to, int? limit) - { - var query = - from q in AuditTrailContext.AuditEvents - from p in AuditTrailContext.Users.Where(p => q.UserId == p.Id).DefaultIfEmpty() - where q.TenantId == tenant - orderby q.Date descending - select new Query { AuditEvent = q, User = p }; - - if (fromDate.HasValue && to.HasValue) - query = query.Where(q => q.AuditEvent.Date >= fromDate & q.AuditEvent.Date <= to); - - if (limit.HasValue) query = query.Take((int)limit); - - return query.AsEnumerable().Select(ToAuditEvent).ToList(); - } - - public int GetCount(int tenant, DateTime? from = null, DateTime? to = null) - { - IQueryable query = AuditTrailContext.AuditEvents - .Where(a => a.TenantId == tenant) - .OrderByDescending(a => a.Date); - - if (from.HasValue && to.HasValue) - query = query.Where(a => a.Date >= from & a.Date <= to); - - return query.Count(); - } - - private AuditEvent ToAuditEvent(Query query) - { - try - { - var evt = new AuditEvent - { - Id = query.AuditEvent.Id, - Ip = query.AuditEvent.Ip, - Initiator = query.AuditEvent.Initiator, - Browser = query.AuditEvent.Browser, - Platform = query.AuditEvent.Platform, - Date = query.AuditEvent.Date, - TenantId = query.AuditEvent.TenantId, - UserId = query.AuditEvent.UserId, - Page = query.AuditEvent.Page, - Action = query.AuditEvent.Action - }; - - if (query.AuditEvent.Description != null) - { - evt.Description = JsonConvert.DeserializeObject>( - Convert.ToString(query.AuditEvent.Description), - new JsonSerializerSettings { DateTimeZoneHandling = DateTimeZoneHandling.Utc }); - } - - evt.Target = _messageTarget.Parse(query.AuditEvent.Target); - - evt.UserName = (query.User.FirstName != null && query.User.LastName != null) ? _userFormatter.GetUserName(query.User.FirstName, query.User.LastName) : - evt.UserId == Core.Configuration.Constants.CoreSystem.ID ? AuditReportResource.SystemAccount : - evt.UserId == Core.Configuration.Constants.Guest.ID ? AuditReportResource.GuestAccount : - evt.Initiator ?? AuditReportResource.UnknownAccount; - - evt.ActionText = _auditActionMapper.GetActionText(evt); - evt.ActionTypeText = _auditActionMapper.GetActionTypeText(evt); - evt.Product = _auditActionMapper.GetProductText(evt); - evt.Module = _auditActionMapper.GetModuleText(evt); - - return evt; - } - catch (Exception) { } - - return null; - } - - private class Query - { - public Core.Common.EF.Model.AuditEvent AuditEvent { get; set; } - public User User { get; set; } - } - } +/* + * + * (c) Copyright Ascensio System Limited 2010-2018 + * + * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU + * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). + * In accordance with Section 7(a) of the GNU GPL its Section 15 shall be amended to the effect that + * Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights. + * + * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR + * FITNESS FOR A PARTICULAR PURPOSE. For more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html + * + * You can contact Ascensio System SIA by email at sales@onlyoffice.com + * + * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display + * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. + * + * Pursuant to Section 7 � 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains + * relevant author attributions when distributing the software. If the display of the logo in its graphic + * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" + * in every copy of the program you distribute. + * Pursuant to Section 7 � 3(e) we decline to grant you any rights under trademark law for use of our trademarks. + * +*/ + + +using System; +using System.Collections.Generic; +using System.Linq; + +using ASC.AuditTrail.Mappers; +using ASC.AuditTrail.Models; +using ASC.Common; +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Context; +using ASC.Core.Users; +using ASC.MessagingSystem; + +using Newtonsoft.Json; + +namespace ASC.AuditTrail.Repositories +{ + [Scope] + public class AuditEventsRepository + { + private AuditTrailContext AuditTrailContext => _lazyAuditTrailContext.Value; + + private readonly MessageTarget _messageTarget; + private readonly UserFormatter _userFormatter; + private readonly Lazy _lazyAuditTrailContext; + private readonly AuditActionMapper _auditActionMapper; + + public AuditEventsRepository( + MessageTarget messageTarget, + UserFormatter userFormatter, + DbContextManager dbContextManager, + AuditActionMapper auditActionMapper) + { + _messageTarget = messageTarget; + _userFormatter = userFormatter; + _lazyAuditTrailContext = new Lazy(() => dbContextManager.Value ); + _auditActionMapper = auditActionMapper; + } + + public IEnumerable GetLast(int tenant, int chunk) => Get(tenant, null, null, chunk); + + public IEnumerable Get(int tenant, DateTime from, DateTime to) => Get(tenant, from, to, null); + + private IEnumerable Get(int tenant, DateTime? fromDate, DateTime? to, int? limit) + { + var query = + from q in AuditTrailContext.AuditEvents + from p in AuditTrailContext.Users.Where(p => q.UserId == p.Id).DefaultIfEmpty() + where q.TenantId == tenant + orderby q.Date descending + select new AuditEventQuery { AuditEvent = q, User = p }; + + if (fromDate.HasValue && to.HasValue) + query = query.Where(q => q.AuditEvent.Date >= fromDate & q.AuditEvent.Date <= to); + + if (limit.HasValue) query = query.Take((int)limit); + + return query.AsEnumerable().Select(ToAuditEvent).ToList(); + } + + public int GetCount(int tenant, DateTime? from = null, DateTime? to = null) + { + IQueryable query = AuditTrailContext.AuditEvents + .Where(a => a.TenantId == tenant) + .OrderByDescending(a => a.Date); + + if (from.HasValue && to.HasValue) + query = query.Where(a => a.Date >= from & a.Date <= to); + + return query.Count(); + } + + private AuditEvent ToAuditEvent(AuditEventQuery query) + { + try + { + var evt = new AuditEvent + { + Id = query.AuditEvent.Id, + Ip = query.AuditEvent.Ip, + Initiator = query.AuditEvent.Initiator, + Browser = query.AuditEvent.Browser, + Platform = query.AuditEvent.Platform, + Date = query.AuditEvent.Date, + TenantId = query.AuditEvent.TenantId, + UserId = query.AuditEvent.UserId, + Page = query.AuditEvent.Page, + Action = query.AuditEvent.Action + }; + + if (query.AuditEvent.Description != null) + { + evt.Description = JsonConvert.DeserializeObject>( + Convert.ToString(query.AuditEvent.Description), + new JsonSerializerSettings { DateTimeZoneHandling = DateTimeZoneHandling.Utc }); + } + + evt.Target = _messageTarget.Parse(query.AuditEvent.Target); + + evt.UserName = (query.User.FirstName != null && query.User.LastName != null) ? _userFormatter.GetUserName(query.User.FirstName, query.User.LastName) : + evt.UserId == Core.Configuration.Constants.CoreSystem.ID ? AuditReportResource.SystemAccount : + evt.UserId == Core.Configuration.Constants.Guest.ID ? AuditReportResource.GuestAccount : + evt.Initiator ?? AuditReportResource.UnknownAccount; + + evt.ActionText = _auditActionMapper.GetActionText(evt); + evt.ActionTypeText = _auditActionMapper.GetActionTypeText(evt); + evt.Product = _auditActionMapper.GetProductText(evt); + evt.Module = _auditActionMapper.GetModuleText(evt); + + return evt; + } + catch (Exception) { } + + return null; + } + } } \ No newline at end of file diff --git a/common/services/ASC.AuditTrail/LoginEventsRepository.cs b/common/services/ASC.AuditTrail/Repositories/LoginEventsRepository.cs similarity index 98% rename from common/services/ASC.AuditTrail/LoginEventsRepository.cs rename to common/services/ASC.AuditTrail/Repositories/LoginEventsRepository.cs index eb62f8d9e5..b9fe4dac71 100644 --- a/common/services/ASC.AuditTrail/LoginEventsRepository.cs +++ b/common/services/ASC.AuditTrail/Repositories/LoginEventsRepository.cs @@ -28,59 +28,60 @@ using System; using System.Collections.Generic; using System.Linq; - + using ASC.AuditTrail.Mappers; +using ASC.AuditTrail.Models; using ASC.Common; using ASC.Core.Common.EF; using ASC.Core.Common.EF.Context; using ASC.Core.Common.EF.Model; using ASC.Core.Users; - + using Newtonsoft.Json; -namespace ASC.AuditTrail.Data -{ +namespace ASC.AuditTrail.Data.Repositories +{ [Scope] public class LoginEventsRepository - { - private MessagesContext MessagesContext => _lazyMessagesContext.Value; + { + private MessagesContext MessagesContext => _lazyMessagesContext.Value; - private readonly UserFormatter _userFormatter; - private readonly AuditActionMapper _auditActionMapper; + private readonly UserFormatter _userFormatter; + private readonly AuditActionMapper _auditActionMapper; private readonly Lazy _lazyMessagesContext; - public LoginEventsRepository( - UserFormatter userFormatter, - AuditActionMapper auditActionMapper, + public LoginEventsRepository( + UserFormatter userFormatter, + AuditActionMapper auditActionMapper, DbContextManager dbMessagesContext) { _userFormatter = userFormatter; - _auditActionMapper = auditActionMapper; + _auditActionMapper = auditActionMapper; _lazyMessagesContext = new Lazy(() => dbMessagesContext.Value); } public IEnumerable GetLast(int tenant, int chunk) - { - var query = - (from b in MessagesContext.LoginEvents - from p in MessagesContext.Users.Where(p => b.UserId == p.Id).DefaultIfEmpty() - where b.TenantId == tenant - orderby b.Date descending - select new LoginEventQuery { LoginEvents = b, User = p }) - .Take(chunk); - + { + var query = + (from b in MessagesContext.LoginEvents + from p in MessagesContext.Users.Where(p => b.UserId == p.Id).DefaultIfEmpty() + where b.TenantId == tenant + orderby b.Date descending + select new LoginEventQuery { LoginEvents = b, User = p }) + .Take(chunk); + return query.AsEnumerable().Select(ToLoginEvent).ToList(); } public IEnumerable Get(int tenant, DateTime fromDate, DateTime to) { - var query = - from q in MessagesContext.LoginEvents - from p in MessagesContext.Users.Where(p => q.UserId == p.Id).DefaultIfEmpty() - where q.TenantId == tenant - where q.Date >= fromDate - where q.Date <= to - orderby q.Date descending + var query = + from q in MessagesContext.LoginEvents + from p in MessagesContext.Users.Where(p => q.UserId == p.Id).DefaultIfEmpty() + where q.TenantId == tenant + where q.Date >= fromDate + where q.Date <= to + orderby q.Date descending select new LoginEventQuery { LoginEvents = q, User = p }; return query.AsEnumerable().Select(ToLoginEvent).ToList(); @@ -98,27 +99,27 @@ namespace ASC.AuditTrail.Data private LoginEvent ToLoginEvent(LoginEventQuery query) { - var evt = new LoginEvent - { - Id = query.LoginEvents.Id, - Ip = query.LoginEvents.Ip, - Login = query.LoginEvents.Login, - Browser = query.LoginEvents.Browser, - Platform = query.LoginEvents.Platform, - Date = query.LoginEvents.Date, - TenantId = query.LoginEvents.TenantId, - UserId = query.LoginEvents.UserId, - Page = query.LoginEvents.Page, - Action = query.LoginEvents.Action + var evt = new LoginEvent + { + Id = query.LoginEvents.Id, + Ip = query.LoginEvents.Ip, + Login = query.LoginEvents.Login, + Browser = query.LoginEvents.Browser, + Platform = query.LoginEvents.Platform, + Date = query.LoginEvents.Date, + TenantId = query.LoginEvents.TenantId, + UserId = query.LoginEvents.UserId, + Page = query.LoginEvents.Page, + Action = query.LoginEvents.Action }; - if (query.LoginEvents.Description != null) + if (query.LoginEvents.Description != null) evt.Description = JsonConvert.DeserializeObject>( query.LoginEvents.Description, - new JsonSerializerSettings - { - DateTimeZoneHandling = DateTimeZoneHandling.Utc - }); + new JsonSerializerSettings + { + DateTimeZoneHandling = DateTimeZoneHandling.Utc + }); evt.UserName = (!string.IsNullOrEmpty(query.User?.FirstName) && !string.IsNullOrEmpty(query.User?.LastName)) ? _userFormatter.GetUserName(query.User.FirstName, query.User.LastName) @@ -128,15 +129,15 @@ namespace ASC.AuditTrail.Data ? AuditReportResource.GuestAccount : AuditReportResource.UnknownAccount; - evt.ActionText = _auditActionMapper.GetActionText(evt); - + evt.ActionText = _auditActionMapper.GetActionText(evt); + return evt; } - } - - public class LoginEventQuery - { - public LoginEvents LoginEvents { get; set; } - public User User { get; set; } + } + + public class LoginEventQuery + { + public LoginEvents LoginEvents { get; set; } + public User User { get; set; } } } \ No newline at end of file