Browse Source
Merge pull request #8710 from abpframework/auto-merge/rel-4-3/326
Merge branch dev with rel-4.3
pull/8738/head
Halil İbrahim Kalkan
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
14 additions and
7 deletions
-
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Menus/SettingManagementMenuContributor.cs
-
modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs
-
modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml.cs
|
|
|
@ -21,8 +21,7 @@ namespace Volo.Abp.SettingManagement.Blazor.Menus |
|
|
|
{ |
|
|
|
var settingManagementPageOptions = context.ServiceProvider.GetRequiredService<IOptions<SettingManagementComponentOptions>>().Value; |
|
|
|
var settingPageCreationContext = new SettingComponentCreationContext(context.ServiceProvider); |
|
|
|
if ( |
|
|
|
!settingManagementPageOptions.Contributors.Any() || |
|
|
|
if (!settingManagementPageOptions.Contributors.Any() || |
|
|
|
!(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext)) |
|
|
|
) |
|
|
|
{ |
|
|
|
@ -31,6 +30,10 @@ namespace Volo.Abp.SettingManagement.Blazor.Menus |
|
|
|
|
|
|
|
var l = context.GetLocalizer<AbpSettingManagementResource>(); |
|
|
|
|
|
|
|
/* This may happen if MVC UI is being used in the same application. |
|
|
|
* In this case, we are removing the MVC setting management UI. */ |
|
|
|
context.Menu.GetAdministration().TryRemoveMenuItem(SettingManagementMenus.GroupName); |
|
|
|
|
|
|
|
context.Menu |
|
|
|
.GetAdministration() |
|
|
|
.AddItem( |
|
|
|
|
|
|
|
@ -19,12 +19,17 @@ namespace Volo.Abp.SettingManagement.Web.Navigation |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (context.Menu.FindMenuItem(SettingManagementMenuNames.GroupName) != null) |
|
|
|
{ |
|
|
|
/* This may happen if blazor server UI is being used in the same application. |
|
|
|
* In this case, we don't add the MVC setting management UI. */ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
var settingManagementPageOptions = context.ServiceProvider.GetRequiredService<IOptions<SettingManagementPageOptions>>().Value; |
|
|
|
var settingPageCreationContext = new SettingPageCreationContext(context.ServiceProvider); |
|
|
|
if ( |
|
|
|
!settingManagementPageOptions.Contributors.Any() || |
|
|
|
!(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext)) |
|
|
|
) |
|
|
|
if (!settingManagementPageOptions.Contributors.Any() || |
|
|
|
!(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext))) |
|
|
|
{ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,4 +1,3 @@ |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
|