Skip to content

Commit

Permalink
Add link for audit logging from user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
skoruba committed Nov 4, 2019
1 parent 2326155 commit 985f972
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Audit Log" xml:space="preserve">
<value>Audit Log</value>
</data>
<data name="ButtonChangePassword" xml:space="preserve">
<value>Change Password</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<a asp-action="UserClaims" asp-route-id="@Model.Id" class="btn btn-outline-primary">@Localizer["ButtonManageUserClaims"]</a>
<a asp-action="UserRoles" asp-route-id="@Model.Id" class="btn btn-outline-primary">@Localizer["ButtonManageUserRoles"]</a>
<a asp-action="UserProviders" asp-route-id="@Model.Id" class="btn btn-outline-primary">@Localizer["ButtonManageUserExternalProviders"]</a>
<a asp-action="AuditLog" asp-controller="Log" asp-route-subjectIdentifier="@Model.Id" class="btn btn-primary">@Localizer["Audit Log"]</a>
<a asp-action="UserChangePassword" asp-route-id="@Model.Id" class="btn btn-dark">@Localizer["ButtonChangePassword"]</a>
<a asp-action="UserDelete" asp-route-id="@Model.Id" class="btn btn-danger">@Localizer["ButtonDeleteUser"]</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System.Threading.Tasks;
using IdentityServer4.Events;
using IdentityServer4.Services;
using Microsoft.Extensions.Logging;

namespace Skoruba.IdentityServer4.STS.Identity.Services
{
public class AuditEventSink : DefaultEventSink
{
public AuditEventSink(ILogger<DefaultEventService> logger) : base(logger)
{
}

public override Task PersistAsync(Event evt)
{
return base.PersistAsync(evt);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="5.1.3-dev-00236" />
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="1.0.0-beta6-update1" />
</ItemGroup>

<ItemGroup>
Expand All @@ -25,4 +26,8 @@
<ProjectReference Include="..\Skoruba.IdentityServer4.Admin.EntityFramework\Skoruba.IdentityServer4.Admin.EntityFramework.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Events\" />
</ItemGroup>

</Project>

0 comments on commit 985f972

Please sign in to comment.