Browse Source

Check scope is null or empty.

pull/2921/head
maliming 7 years ago
parent
commit
78d6831efa
  1. 6
      modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml
  2. 2
      modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs

6
modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml

@ -1,4 +1,4 @@
@page @page
@using Volo.Abp.Account.Web.Pages @using Volo.Abp.Account.Web.Pages
@using Volo.Abp.Account.Web.Pages.Account @using Volo.Abp.Account.Web.Pages.Account
@model ConsentModel @model ConsentModel
@ -25,7 +25,7 @@
<div>Uncheck the permissions you do not wish to grant.</div> <div>Uncheck the permissions you do not wish to grant.</div>
@if (Model.ConsentInput.IdentityScopes.Any()) @if (!Model.ConsentInput.IdentityScopes.IsNullOrEmpty())
{ {
<h3>Personal Information</h3> <h3>Personal Information</h3>
@ -55,7 +55,7 @@
</ul> </ul>
} }
@if (Model.ConsentInput.ApiScopes.Any()) @if (!Model.ConsentInput.ApiScopes.IsNullOrEmpty())
{ {
<h3>Application Access</h3> <h3>Application Access</h3>

2
modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs

@ -106,7 +106,7 @@ namespace Volo.Abp.Account.Web.Pages
} }
else else
{ {
if (ConsentInput.IdentityScopes.Any() || ConsentInput.ApiScopes.Any()) if (!ConsentInput.IdentityScopes.IsNullOrEmpty() || !ConsentInput.ApiScopes.IsNullOrEmpty())
{ {
grantedConsent = new ConsentResponse grantedConsent = new ConsentResponse
{ {

Loading…
Cancel
Save