diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/en.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/en.json index 0886572861..bb6999c100 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/en.json +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/en.json @@ -1,6 +1,8 @@ { "culture": "en", "texts": { - "Permissions": "Permissions" + "Permissions": "Permissions", + "OnlyProviderPermissons": "Only this provider", + "All": "All" } } \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/tr.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/tr.json index 061b93fd86..8da6bccd95 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/tr.json +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Localization/Resources/AbpPermissionManagement/tr.json @@ -1,6 +1,8 @@ { "culture": "tr", "texts": { - "Permissions": "İzinler" + "Permissions": "İzinler", + "OnlyProviderPermissons": "Sadece bu sağlayıcı", + "All": "Hepsi" } } \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml index a2bc020495..20b42df993 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml @@ -19,35 +19,49 @@ - - - - - -
- @for (var i = 0; i < Model.Groups.Count; i++) + } + + + @for (var j = 0; j < Model.Groups[i].Permissions.Count; j++) { -
- @for (var j = 0; j < Model.Groups[i].Permissions.Count; j++) - { - - - } + var hideCheckboxOnToggle = (Model.Groups[i].Permissions[j].Providers?.All(p => p.ProviderName != Model.ProviderName)) ?? true; +
+ +
} -
- - +
+ } + diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs index 55217b797a..04ea5330db 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/PermissionManagementModal.cshtml.cs @@ -20,6 +20,9 @@ namespace Volo.Abp.PermissionManagement.Web.Pages.AbpPermissionManagement [BindProperty(SupportsGet = true)] public string ProviderKey { get; set; } + [BindProperty(SupportsGet = true)] + public bool ShowOnlyProviderPermissons { get; set; } = false; + [BindProperty] public List Groups { get; set; } diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/permission-management-modal.js b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/permission-management-modal.js index fa4815e16e..c4256bfc26 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/permission-management-modal.js +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Pages/AbpPermissionManagement/permission-management-modal.js @@ -48,6 +48,17 @@ } }); }); + $('input:radio[name="ShowOnlyProviderPermissonsToggle"]').change( + function () { + if ($(this).val() == '1') { + $('.HideOnProviderToggle').slideUp(); + $('.hideTabOnToggle').slideUp(); + } + else { + $('.HideOnProviderToggle').slideDown(); + $('.hideTabOnToggle').slideDown(); + } + }); }); }; };