From 2329d07939ca45d12088db5046564bce7dc2a951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Wed, 25 May 2016 14:01:17 +0200 Subject: [PATCH] Update the authorization view to hide the resources list when the "resource" parameter is empty --- src/OpenIddict.Mvc/Views/Shared/Authorize.cshtml | 11 +++++++---- src/OpenIddict.Mvc/Views/Shared/Logout.cshtml | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/OpenIddict.Mvc/Views/Shared/Authorize.cshtml b/src/OpenIddict.Mvc/Views/Shared/Authorize.cshtml index 33a1919d..9f7935c9 100644 --- a/src/OpenIddict.Mvc/Views/Shared/Authorize.cshtml +++ b/src/OpenIddict.Mvc/Views/Shared/Authorize.cshtml @@ -6,8 +6,11 @@

Authorization

-

Do you wanna grant @Model.Item2 access to your resources? (scopes requested: @Model.Item1.Scope)

-

@Model.Item2 will be able to access the following endpoints: @string.Join(" ; ", Model.Item1.GetResources())

+

Do you want to grant @Model.Item2 access to your data? (scopes requested: @Model.Item1.Scope)

+ + @if (!string.IsNullOrEmpty(Model.Item1.Resource)) { +

@Model.Item2 will be able to access the following endpoints: @string.Join(" ; ", Model.Item1.GetResources())

+ }
@Html.AntiForgeryToken() @@ -16,7 +19,7 @@ } - - + +
diff --git a/src/OpenIddict.Mvc/Views/Shared/Logout.cshtml b/src/OpenIddict.Mvc/Views/Shared/Logout.cshtml index e8a727c1..343082bb 100644 --- a/src/OpenIddict.Mvc/Views/Shared/Logout.cshtml +++ b/src/OpenIddict.Mvc/Views/Shared/Logout.cshtml @@ -13,6 +13,6 @@ } - + \ No newline at end of file