Skip to content

Commit

Permalink
Add logging of user details in NoConfig view
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-vakil committed Jul 19, 2024
1 parent 5317cd9 commit d5e2234
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions cnab/app/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ switch ($action) {
}

image = @{
pullPolicy = "Always"
pullSecretName = $pullSecretName
}

Expand Down
4 changes: 2 additions & 2 deletions cnab/app/variables.GCP.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"opserverSettings": {
"hostUrl": "opserver.sandbox.int.gcp.stackoverflow.net",
"sql": [
{ "name": "host.docker.internal" }
{ "name": "db.db" }
],
"exceptions": [
{ "serverName": "host.docker.internal" }
{ "serverName": "db.db" }
],
"security": {
"adminGroups": ["OpserverDev-Admin"],
Expand Down
9 changes: 9 additions & 0 deletions src/Opserver.Web/Views/Shared/NoConfiguration.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
<p>
You can browse to <a href="~/about">/about</a> to see how you have been authenticated and what monitors have been enabled.
</p>
<P>
Your access:
<ul>
<li>Account: @Current.Security.AccountName</li>

Check failure on line 30 in src/Opserver.Web/Views/Shared/NoConfiguration.cshtml

View workflow job for this annotation

GitHub Actions / build

'SecurityProvider' does not contain a definition for 'AccountName' and no accessible extension method 'AccountName' accepting a first argument of type 'SecurityProvider' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 30 in src/Opserver.Web/Views/Shared/NoConfiguration.cshtml

View workflow job for this annotation

GitHub Actions / build

'SecurityProvider' does not contain a definition for 'AccountName' and no accessible extension method 'AccountName' accepting a first argument of type 'SecurityProvider' could be found (are you missing a using directive or an assembly reference?)
<li>Is Anonymous: @Current.Security.IsAnonymous</li>

Check failure on line 31 in src/Opserver.Web/Views/Shared/NoConfiguration.cshtml

View workflow job for this annotation

GitHub Actions / build

'SecurityProvider' does not contain a definition for 'IsAnonymous' and no accessible extension method 'IsAnonymous' accepting a first argument of type 'SecurityProvider' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 31 in src/Opserver.Web/Views/Shared/NoConfiguration.cshtml

View workflow job for this annotation

GitHub Actions / build

'SecurityProvider' does not contain a definition for 'IsAnonymous' and no accessible extension method 'IsAnonymous' accepting a first argument of type 'SecurityProvider' could be found (are you missing a using directive or an assembly reference?)
<li>Is Global Admin: @Current.Security.IsGlobalAdmin</li>

Check failure on line 32 in src/Opserver.Web/Views/Shared/NoConfiguration.cshtml

View workflow job for this annotation

GitHub Actions / build

Argument 1: cannot convert from 'method group' to 'object?'

Check failure on line 32 in src/Opserver.Web/Views/Shared/NoConfiguration.cshtml

View workflow job for this annotation

GitHub Actions / build

Argument 1: cannot convert from 'method group' to 'object?'
<li>Roles: @string.Join(", ", Current.Security.Roles)</li>

Check failure on line 33 in src/Opserver.Web/Views/Shared/NoConfiguration.cshtml

View workflow job for this annotation

GitHub Actions / build

'SecurityProvider' does not contain a definition for 'Roles' and no accessible extension method 'Roles' accepting a first argument of type 'SecurityProvider' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 33 in src/Opserver.Web/Views/Shared/NoConfiguration.cshtml

View workflow job for this annotation

GitHub Actions / build

'SecurityProvider' does not contain a definition for 'Roles' and no accessible extension method 'Roles' accepting a first argument of type 'SecurityProvider' could be found (are you missing a using directive or an assembly reference?)
</ul>
</P>
}
</div>
</div>
Expand Down

0 comments on commit d5e2234

Please sign in to comment.