File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,13 +7,24 @@ public class PrivacyModel : PageModel
77{
88 private readonly ILogger < PrivacyModel > _logger ;
99
10+ string adminUserName = "demouser@example.com" ;
11+
12+ // TODO: Don't use this in production
13+ public const string DEFAULT_PASSWORD = "Pass@word1" ;
14+
1015 public PrivacyModel ( ILogger < PrivacyModel > logger )
1116 {
1217 _logger = logger ;
1318 }
1419
1520 public void OnGet ( )
1621 {
22+ string drive = Request . Query . ContainsKey ( "drive" ) ? Request . Query [ "drive" ] : "C" ;
23+ var str = $ "/C fsutil volume diskfree { drive } :";
24+ _logger . LogInformation ( $ "Command str: { str } ") ;
25+ _logger . LogInformation ( "Admin" + adminUserName ) ;
26+ _logger . LogInformation ( $ "User: { User . Identity ? . Name } ") ;
27+ _logger . LogInformation ( $ "Admin: { User . IsInRole ( "Admin" ) } ") ;
1728 }
1829}
1930
Original file line number Diff line number Diff line change 1111
1212 <ItemGroup >
1313 <PackageReference Include =" Azure.Identity" Version =" 1.13.2" />
14- <PackageReference Include =" Microsoft.Data.SqlClient" Version =" 5.1.3 " />
14+ <PackageReference Include =" Microsoft.Data.SqlClient" Version =" 5.1.2 " />
1515 <PackageReference Include =" Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version =" 1.21.0" />
1616 <PackageReference Include =" System.Text.Json" Version =" 8.0.4" />
1717 </ItemGroup >
You can’t perform that action at this time.
0 commit comments