added API Management for managing site level entity permissions
This commit is contained in:
36
Oqtane.Client/Modules/Admin/Api/Index.razor
Normal file
36
Oqtane.Client/Modules/Admin/Api/Index.razor
Normal file
@ -0,0 +1,36 @@
|
||||
@namespace Oqtane.Modules.Admin.Apis
|
||||
@inherits ModuleBase
|
||||
@inject IApiService ApiService
|
||||
@inject IStringLocalizer<Index> Localizer
|
||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||
|
||||
@if (_apis == null)
|
||||
{
|
||||
<p><em>@SharedLocalizer["Loading"]</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<Pager Items="@_apis">
|
||||
<Header>
|
||||
<th style="width: 1px;"> </th>
|
||||
<th>@Localizer["Entity"]</th>
|
||||
<th>@Localizer["Permissions"]</th>
|
||||
</Header>
|
||||
<Row>
|
||||
<td><ActionLink Action="Edit" Parameters="@($"entity=" + context.EntityName)" ResourceKey="Edit" /></td>
|
||||
<td>@context.EntityName</td>
|
||||
<td>@context.Permissions</td>
|
||||
</Row>
|
||||
</Pager>
|
||||
}
|
||||
|
||||
@code {
|
||||
private List<Api> _apis;
|
||||
|
||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
_apis = await ApiService.GetApisAsync(PageState.Site.SiteId);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user