Merge pull request #4573 from leigh-pointer/AddExisitng

Fix for Deleted Modules showing in AddExisting & CopyExisting dropdow…
This commit is contained in:
Shaun Walker 2024-08-28 21:17:54 -04:00 committed by GitHub
commit a683a5f206
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -331,7 +331,7 @@
if (_pageId != "-")
{
_modules = await ModuleService.GetModulesAsync(PageState.Page.SiteId);
_modules = _modules.Where(module => module.PageId == int.Parse(_pageId) &&
_modules = _modules.Where(module => module.PageId == int.Parse(_pageId) && module.IsDeleted == false &&
UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, module.PermissionList) &&
(_moduleType == "add" || module.ModuleDefinition.IsPortable))
.ToList();