Skip to content

Commit

Permalink
link permission tree page on relationships page
Browse files Browse the repository at this point in the history
  • Loading branch information
josxha committed Oct 21, 2023
1 parent dd93942 commit 7d84937
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
6 changes: 1 addition & 5 deletions OryAdmin/Components/Pages/Permissions/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ else
<thead>
<th>Name</th>
<th>Relationships</th>
<th>Permissions</th>
</thead>
<tbody>
@foreach (var item in _namespaces.Namespaces)
{
<tr>
<td>@item.Name</td>
<td>
<a href="permissions/@item.Name/relationships">Relationships</a>
</td>
<td>
<a href="permissions/@item.Name/tree">Permissions</a>
<a href="permissions/@item.Name">Relationships</a>
</td>
</tr>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/permissions/{NamespaceName}/relationships/create"
@page "/permissions/{NamespaceName}/create"
@attribute [StreamRendering]
@attribute [RenderModeInteractiveServer]
@inject NavigationManager nav
Expand Down
10 changes: 8 additions & 2 deletions OryAdmin/Components/Pages/Permissions/Relationships/Index.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/permissions/{NamespaceName}/relationships"
@page "/permissions/{NamespaceName}"
@attribute [StreamRendering]
@attribute [RenderModeInteractiveServer]

Expand All @@ -7,7 +7,7 @@
<h1 class="title">Relationships for @NamespaceName</h1>
<div class="buttons">
<a class="button is-dark" href="permissions">Back</a>
<a class="button is-success" href="permissions/@NamespaceName/relationships/create">Create Relationship</a>
<a class="button is-success" href="permissions/@NamespaceName/create">Create Relationship</a>
</div>
@if (_isLoading)
{
Expand Down Expand Up @@ -37,6 +37,7 @@ else
<th>Relation</th>
<th></th>
<th>Object</th>
<th></th>
</thead>
<tbody>
@foreach (var relationship in _relationships.RelationTuples)
Expand All @@ -51,6 +52,11 @@ else
<p class="is-bold">of</p>
</td>
<td>@relationship.Object</td>
<td>
<a href="permissions/@NamespaceName/[email protected]&[email protected]">
Permission Tree
</a>
</td>
</tr>
}
</tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/permissions/{namespaceName}/tree"
@page "/permissions/{NamespaceName}/tree"
@attribute [StreamRendering]
@attribute [RenderModeInteractiveServer]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@

// ReSharper disable UnusedAutoPropertyAccessor.Local

namespace OryAdmin.Components.Pages.Permissions;
namespace OryAdmin.Components.Pages.Permissions.Relationships;

public partial class Tree
{
private string? _errorMessage;
private bool _isLoading = true;
private KetoExpandedPermissionTree? _permissionTree;

[Parameter]
public required string NamespaceName { get; set; }
[Parameter] public required string NamespaceName { get; set; }

[SupplyParameterFromQuery(Name = "relation")]
private string? Relation { get; set; }
Expand Down

0 comments on commit 7d84937

Please sign in to comment.