Deprecate AuditService.Write() method (#19306)

* Deprecate the AuditService.Write() method

It will be moved to a new service with the rework of the AuditService, as it relates to a different repository (umbracoLog vs umbracoAudit).

* Update obsolete message to reference V18

* Apply suggestions from code review

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

---------

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
This commit is contained in:
Laura Neto
2025-05-13 11:58:34 +02:00
committed by GitHub
parent 81ae9f41e8
commit f784f62303
2 changed files with 11 additions and 1 deletions

View File

@@ -264,7 +264,16 @@ public sealed class AuditService : RepositoryService, IAuditService
}
/// <inheritdoc />
public IAuditEntry Write(int performingUserId, string perfomingDetails, string performingIp, DateTime eventDateUtc, int affectedUserId, string? affectedDetails, string eventType, string eventDetails)
[Obsolete("Will be moved to a new service in V17. Scheduled for removal in V18.")]
public IAuditEntry Write(
int performingUserId,
string perfomingDetails,
string performingIp,
DateTime eventDateUtc,
int affectedUserId,
string? affectedDetails,
string eventType,
string eventDetails)
{
if (performingUserId < 0 && performingUserId != Constants.Security.SuperUserId)
{

View File

@@ -144,6 +144,7 @@ public interface IAuditService : IService
/// </example>
/// </param>
/// <param name="eventDetails">Free-form details about the audited event.</param>
[Obsolete("Will be moved to a new service in V17. Scheduled for removal in V18.")]
IAuditEntry Write(
int performingUserId,
string perfomingDetails,