improvements to #2736 to support scenarios where module is not explicitly assigned to a page
This commit is contained in:
parent
94a02b7bf9
commit
e0c2b2982f
|
@ -59,6 +59,10 @@ else
|
|||
if (Name.ToLower() == pane.ToLower())
|
||||
{
|
||||
Module module = PageState.Modules.FirstOrDefault(item => item.PageId == PageState.Page.PageId && item.ModuleId == PageState.ModuleId);
|
||||
if (module == null)
|
||||
{
|
||||
module = PageState.Modules.FirstOrDefault(item => item.ModuleId == PageState.ModuleId);
|
||||
}
|
||||
if (module != null)
|
||||
{
|
||||
var moduleType = Type.GetType(module.ModuleType);
|
||||
|
@ -107,8 +111,12 @@ else
|
|||
{
|
||||
if (PageState.ModuleId != -1)
|
||||
{
|
||||
Module module = PageState.Modules.FirstOrDefault(item => item.ModuleId == PageState.ModuleId);
|
||||
if (module != null && module.Pane.ToLower() == Name.ToLower())
|
||||
Module module = PageState.Modules.FirstOrDefault(item => item.PageId == PageState.Page.PageId && item.ModuleId == PageState.ModuleId);
|
||||
if (module == null)
|
||||
{
|
||||
module = PageState.Modules.FirstOrDefault(item => item.ModuleId == PageState.ModuleId);
|
||||
}
|
||||
if (module != null && module.Pane.ToLower() == Name.ToLower())
|
||||
{
|
||||
// check if user is authorized to view module
|
||||
if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.PermissionList))
|
||||
|
|
Loading…
Reference in New Issue
Block a user