The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Index.cshtml 3.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. @model GrantsViewModel
  2. <div class="container">
  3. <div class="row">
  4. <div class="col-md-12 text-center">
  5. <div class="grants">
  6. <div class="row page-header">
  7. <div class="col-sm-12">
  8. <h1>
  9. Client Application Access
  10. </h1>
  11. <div>Below is the list of applications you have given access to and the names of the resources they have access to.</div>
  12. </div>
  13. </div>
  14. @if (Model.Grants.Any() == false)
  15. {
  16. <div class="row">
  17. <div class="col-sm-8">
  18. <div class="alert alert-info">
  19. You have not given access to any applications
  20. </div>
  21. </div>
  22. </div>
  23. }
  24. else
  25. {
  26. foreach (var grant in Model.Grants)
  27. {
  28. <div class="row grant">
  29. <div class="col-sm-2">
  30. @if (grant.ClientLogoUrl != null)
  31. {
  32. <img src="@grant.ClientLogoUrl" style="max-height: 100px; max-width: 100px;">
  33. }
  34. </div>
  35. <div class="col-sm-8">
  36. <div class="clientname">@grant.ClientName</div>
  37. <div>
  38. <span class="created">Created:</span> @grant.Created.ToString("yyyy-MM-dd")
  39. </div>
  40. @if (grant.Expires.HasValue)
  41. {
  42. <div>
  43. <span class="expires">Expires:</span> @grant.Expires.Value.ToString("yyyy-MM-dd")
  44. </div>
  45. }
  46. @if (grant.IdentityGrantNames.Any())
  47. {
  48. <div>
  49. <div class="granttype">Identity Grants</div>
  50. <ul>
  51. @foreach (var name in grant.IdentityGrantNames)
  52. {
  53. <li>@name</li>
  54. }
  55. </ul>
  56. </div>
  57. }
  58. @if (grant.ApiGrantNames.Any())
  59. {
  60. <div>
  61. <div class="granttype">API Grants</div>
  62. <ul>
  63. @foreach (var name in grant.ApiGrantNames)
  64. {
  65. <li>@name</li>
  66. }
  67. </ul>
  68. </div>
  69. }
  70. </div>
  71. <div class="col-sm-2">
  72. <form asp-action="Revoke">
  73. <input type="hidden" name="clientId" value="@grant.ClientId">
  74. <button class="btn btn-danger">Revoke Access</button>
  75. </form>
  76. </div>
  77. </div>
  78. }
  79. }
  80. </div>
  81. </div>
  82. </div>
  83. </div>