diff --git a/src/webapp01/Pages/Privacy.cshtml.cs b/src/webapp01/Pages/Privacy.cshtml.cs index 4bb99c6..be97553 100644 --- a/src/webapp01/Pages/Privacy.cshtml.cs +++ b/src/webapp01/Pages/Privacy.cshtml.cs @@ -7,6 +7,11 @@ public class PrivacyModel : PageModel { private readonly ILogger _logger; + string adminUserName = "demouser@example.com"; + + // TODO: Don't use this in production + public const string DEFAULT_PASSWORD = "Pass@word1"; + public PrivacyModel(ILogger logger) { _logger = logger; @@ -14,6 +19,12 @@ public PrivacyModel(ILogger logger) public void OnGet() { + string drive = Request.Query.ContainsKey("drive") ? Request.Query["drive"] : "C"; + var str = $"/C fsutil volume diskfree {drive}:"; + _logger.LogInformation($"Command str: {str}"); + _logger.LogInformation("Admin" + adminUserName); + _logger.LogInformation($"User: {User.Identity?.Name}"); + _logger.LogInformation($"Admin: {User.IsInRole("Admin")}"); } } diff --git a/src/webapp01/webapp01.csproj b/src/webapp01/webapp01.csproj index 7bae97c..1e1dafd 100644 --- a/src/webapp01/webapp01.csproj +++ b/src/webapp01/webapp01.csproj @@ -11,7 +11,7 @@ - +