Refactor host user security model, support static assets in modules and themes, module definition permissions and categories, paging control, remove SiteUsers, move seed data from script to site template for installation

This commit is contained in:
Shaun Walker
2019-09-19 16:33:48 -04:00
parent 35b9b9e89b
commit 83a212e7e3
61 changed files with 1000 additions and 979 deletions

View File

@ -9,20 +9,20 @@
@inject IPageService PageService
@inject IUserService UserService
<ul class="list-group">
<div class="row">
@foreach (var p in pages)
{
if (UserSecurity.IsAuthorized(PageState.User, "View", p.Permissions))
{
string url = NavigateUrl(p.Path);
<li class="list-group-item">
<div class="col-md-2 mx-auto text-center">
<NavLink class="nav-link" href="@url" Match="NavLinkMatch.All">
<span class="oi @p.Icon" aria-hidden="true"></span> @p.Name
<h2><span class="oi oi-@p.Icon" aria-hidden="true"></span></h2>@p.Name
</NavLink>
</li>
</div>
}
}
</ul>
</div>
<br />
<br />
@ -31,7 +31,7 @@
protected override void OnInitialized()
{
// display list of pages which are children of current page
pages = PageState.Pages.Where(item => item.ParentId == PageState.Page.PageId).ToList();
// display list of pages which are children of current page
pages = PageState.Pages.Where(item => item.ParentId == PageState.Page.PageId).ToList();
}
}
}