filter deleted pages and modules in the router, provide support for cascading aspect of style sheets, replace ResourceDeclaration concept with ResourceLevel

This commit is contained in:
Shaun Walker
2022-03-31 21:05:58 -04:00
parent 06e25e04f8
commit 0fcf1c2732
18 changed files with 77 additions and 110 deletions

View File

@ -333,9 +333,8 @@
if (PageId != "-")
{
_modules = PageState.Modules
.Where(module => module.PageId == int.Parse(PageId)
&& !module.IsDeleted
&& UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.Permissions))
.Where(module => module.PageId == int.Parse(PageId) &&
UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.Permissions))
.ToList();
}
ModuleId = "-";

View File

@ -30,7 +30,7 @@ namespace Oqtane.Themes.Controls
private IEnumerable<Page> GetMenuPages()
{
var securityLevel = int.MaxValue;
foreach (Page p in PageState.Pages.Where(item => item.IsNavigation && !item.IsDeleted))
foreach (Page p in PageState.Pages.Where(item => item.IsNavigation))
{
if (p.Level <= securityLevel && UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.Permissions))
{