diff --git a/.gitignore b/.gitignore index 7d74565..2e3422b 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ data/logs/ data/exports/ data/templates/ data/audit.jsonl +data/appcerts/ diff --git a/Components/Layout/MainLayout.razor b/Components/Layout/MainLayout.razor index 2d3a5dd..b51fd15 100644 --- a/Components/Layout/MainLayout.razor +++ b/Components/Layout/MainLayout.razor @@ -4,6 +4,7 @@ @inject IUserContextAccessor UserContext @inject ISessionCredentialStore CredStore @inject ISessionManager SessionManager +@inject SharepointToolbox.Web.Infrastructure.Auth.IAppOnlyContextFactory AppOnly @inject NavigationManager Nav @inject IJSRuntime JS @inject SharepointToolbox.Web.Services.OAuth.IOAuthFlowCache OAuthCache @@ -44,8 +45,11 @@ {
Generated reports for the selected client.
+ +@if (!Session.HasProfile) {| Name | Type | Generated (UTC) | Size | Status | + |
|---|---|---|---|---|---|
| @(string.IsNullOrEmpty(r.Name) ? "β" : r.Name) | +@r.Type | +@r.GeneratedUtc.ToString("yyyy-MM-dd HH:mm") | +@(r.Status == ReportRunStatus.Success ? $"{r.SizeBytes / 1024.0:F1} KB" : "β") | ++ @if (r.Status == ReportRunStatus.Success) + { + Success + @if (r.Emailed) + { + Emailed + } + else if (!string.IsNullOrEmpty(r.EmailError)) + { + Email failed + } + } + else + { + Failed + } + | +
+
+ @if (r.Status == ReportRunStatus.Success)
+ {
+ Download
+ }
+
+
+ |
+
Automatic report generation per client. Generated files appear under Reports and are downloadable there.
+ +@if (UserContext.Role != UserRole.Admin) +{ +| @T["report.col.user"] | @T["report.col.site"] | @T["report.col.object"] | @T["audit.col.permission"] | @T["report.col.access_type"] | @T["report.col.granted_through"] |
|---|---|---|---|---|---|
| @r.UserDisplayName | -@r.SiteTitle | -@r.ObjectTitle (@r.ObjectType) | -@r.PermissionLevel @if (r.IsHighPrivilege) { @T["audit.chip.high"] } | -@r.AccessType | -@r.GrantedThrough | -
| @T["report.col.user"] | } +@T["report.col.object"] | +@T["audit.col.permission"] |
+ @T["report.col.access_type"] |
+ @T["report.col.granted_through"] |
+
|---|---|---|---|---|
| @r.UserDisplayName | } +@r.ObjectTitle (@r.ObjectType) | +@r.PermissionLevel @if (r.IsHighPrivilege) { @T["audit.chip.high"] } | +@r.AccessType | +@r.GrantedThrough | +
| @T["report.col.user"] | @T["report.col.site"] | @T["report.col.object"] | @T["audit.col.permission"] | @T["report.col.access_type"] | @T["report.col.granted_through"] |
|---|---|---|---|---|---|
| @r.UserDisplayName | +@r.SiteTitle | +@r.ObjectTitle (@r.ObjectType) | +@r.PermissionLevel @if (r.IsHighPrivilege) { @T["audit.chip.high"] } | +@r.AccessType | +@r.GrantedThrough | +
Hello,
Please find attached the {ReportType} report \"{ReportName}\" for {ClientName}, generated on {DateUtc} UTC.
"; +} + +///