Pārlūkot izejas kodu

Update documentation (#857)

Update documentation to match change made to
`IDashboardAuthorizationFilter` in PR 390.
master
Martin Andersen pirms 3 gadiem
committed by GitHub
vecāks
revīzija
d1d5352782
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
2 mainītis faili ar 12 papildinājumiem un 8 dzēšanām
  1. +6
    -4
      docs/content/user-guide/en/monitoring/dashboard.md
  2. +6
    -4
      docs/content/user-guide/zh/monitoring/dashboard.md

+ 6
- 4
docs/content/user-guide/en/monitoring/dashboard.md Parādīt failu

@@ -45,12 +45,14 @@ The following is a sample code that determines if access is allowed by reading t
```C#
public class TestAuthorizationFilter : IDashboardAuthorizationFilter
{
public bool Authorize(DashboardContext context)
public Task<bool> AuthorizeAsync(DashboardContext context)
{
if(context.Request.GetQuery("accesskey")=="xxxxxx"){
return true;
if (context.Request.GetQuery("accesskey") == "xxxxxx")
{
return Task.FromResult(true);
}
return false;
return Task.FromResult(false);
}
}
```


+ 6
- 4
docs/content/user-guide/zh/monitoring/dashboard.md Parādīt failu

@@ -51,12 +51,14 @@ services.AddCap(x =>
```C#
public class TestAuthorizationFilter : IDashboardAuthorizationFilter
{
public bool Authorize(DashboardContext context)
public Task<bool> AuthorizeAsync(DashboardContext context)
{
if(context.Request.GetQuery("accesskey")=="xxxxxx"){
return true;
if (context.Request.GetQuery("accesskey") == "xxxxxx")
{
return Task.FromResult(true);
}
return false;
return Task.FromResult(false);
}
}
```


Notiek ielāde…
Atcelt
Saglabāt