Activities of "liangshiwei"

Hi,

I could not reproduce the problem.

The temporary solution:

MyPermissionManagementModal.razor

@using Microsoft.Extensions.Localization
@using Volo.Abp.PermissionManagement.Localization
@using Volo.Abp.PermissionManagement.Blazor.Components
@using Volo.Abp.DependencyInjection
@inherits PermissionManagementModal
@attribute [ExposeServices(typeof(PermissionManagementModal))]
@attribute [Dependency(ReplaceServices = true)]


<Modal @ref="_modal" Closing="@ClosingModal">
    <ModalContent Size="ModalSize.Large" Centered="true">
        <ModalHeader>
            <ModalTitle>@L["Permissions"] - @_entityDisplayName</ModalTitle>
            <CloseButton Clicked="CloseModal" />
        </ModalHeader>
        <ModalBody MaxHeight="50">
            
            <Field>
                <Check Disabled="_selectAllDisabled" Cursor="Cursor.Pointer" @bind-Checked="@GrantAll" TValue="bool">
                    @L["SelectAllInAllTabs"]
                </Check>
            </Field>
            
            <Divider />
            
            @if (_groups != null)
            {
                <Tabs TabPosition="TabPosition.Start" Pills="true" @bind-SelectedTab="@_selectedTabName">
                    <Items>
                        @foreach (var group in _groups)
                        {
                            <Tab Name="@GetNormalizedGroupName(group.Name)">
                                @if (group.Permissions.Any(x => x.IsGranted))
                                {
                                    <span>
                                        <b>@group.DisplayName ( @(group.Permissions.Count(x => x.IsGranted)) )</b>
                                    </span>
                                }
                                else
                                {
                                    <span>
                                        @group.DisplayName ( @(group.Permissions.Count(x => x.IsGranted)) )
                                    </span>
                                }
                            </Tab>
                        }
                    </Items>
                    <Content>
                        @foreach (var group in _groups)
                        {
                            <TabPanel Name="@GetNormalizedGroupName(group.Name)">
                                <h4>@group.DisplayName</h4>
                                
                                <Divider />
                                
                                <Field>
                                    <Check
                                        Disabled="@(IsPermissionGroupDisabled(group))"
                                        Checked="@(group.Permissions.All(x => x.IsGranted))"
                                        Cursor="Cursor.Pointer"
                                        CheckedChanged="@(b => GroupGrantAllChanged(b, group))"
                                        TValue="bool">
                                        @L["SelectAllInThisTab"]
                                    </Check>
                                </Field>

                                <Divider />
                                
                                @foreach (var permission in group.Permissions)
                                {
                                    <Field Style="@GetMarginStyle(group.Permissions, permission.ParentName)">
                                        <Check
                                            Disabled="@(IsDisabledPermission(permission))"
                                            Cursor="Cursor.Pointer"
                                            Checked="@permission.IsGranted"
                                            CheckedChanged="@(b => PermissionChanged(b, group, permission))"
                                            TValue="bool">
                                            @GetShownName(permission)
                                        </Check>
                                    </Field>
                                }
                                
                            </TabPanel>
                        }
                    </Content>
                </Tabs>
            }
        </ModalBody>
        <ModalFooter>
            <Button Color="Color.Secondary" Clicked="CloseModal">@L["Cancel"]</Button>
            <Button Color="Color.Primary" Clicked="SaveAsync">@L["Save"]</Button>
        </ModalFooter>
    </ModalContent>
</Modal>

@code{
    
    protected virtual string GetMarginStyle(List<Volo.Abp.PermissionManagement.PermissionGrantInfoDto> permissions, string currentParent)
    {
        var currentDepth = GetDepth(permissions, currentParent, 0);

        return $"margin-inline-start: {currentDepth * 20}px;";
    }

    private int GetDepth(List<Volo.Abp.PermissionManagement.PermissionGrantInfoDto> permissions, string currentParent, int currentDepth)
    {
        foreach (var item in permissions)
        {
            if (item.Name == currentParent)
            {
                currentDepth++;
                if (item.ParentName != null)
                {
                    currentDepth = GetDepth(permissions, item.ParentName, currentDepth);
                }

            }
        }

        return currentDepth;
    }
} 
Answer

Hi,

Don't worry, we will always maintain it.

Hi,

It should be supported, but not, it's a problem. I created an issue for this: https://github.com/abpframework/abp/issues/18338

Will provide you with a temporary solution as soon as possible.

Answer

Hi,

Can you share the all app error logs?

How can We change from tenantId (Guid) to KurumId(int).

Sorry, it's not possible. see: https://github.com/abpframework/abp/issues/1704#issuecomment-527372545

You can consider to add a new property type as KurumId(int), then use it as your business primary key:

ObjectExtensionManager.Instance
    .MapEfCoreProperty<Tenant, int>(
        "KurumId",
        (entityBuilder, propertyBuilder) =>
        {
            propertyBuilder.HasIndex()
                           .IsUnique();
        }
    );

Hi,

Is the bug related to backend or is it because assigning a xsrf token to header while sending from the maui client? Probably the latter. Cause i replace the AbpAutoValidateAntiforgeryTokenAuthorizationFilter class it always come with xsrf token when i do a post from maui client.

This is a bug of the GetInsecureHandler method.

How can i see the source code of Volo.Abp.Maui.Client package?

You can add DelegatingHandler:

public class MyHttpMessageHandler : DelegatingHandler, ITransientDependency
{

    protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
          request.Headers .....;

          return await base.SendAsync(request, cancellationToken);
        
    }
}

public override void PreConfigureServices(ServiceConfigurationContext context)
{
    PreConfigure<AbpHttpClientBuilderOptions>(options =>
    {
        options.ProxyClientBuildActions.Add((_, builder) =>
        {
            builder.AddHttpMessageHandler<MyHttpMessageHandler>();
        });
    });
}

Hi,

Have you given it a try? You can see the color of the content has been changed.

If you face any problems during the customization process, please let me know.

Hi,

It's a bug, we will fix it in the next patch version. Your ticket was refunded.

Now you can try update the GetInsecureHandler method:

private static HttpMessageHandler GetInsecureHandler()
{
#if ANDROID
    var handler = new HttpClientHandler()
    {
       UseCookies = false
    };
    handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) =>
    {
        if (cert is { Issuer: "CN=localhost" })
        {
            return true;
        }

        return errors == System.Net.Security.SslPolicyErrors.None;
    };
    return handler;
#elif IOS
    var handler = new NSUrlSessionHandler
    {
        UseCookies = false,
        TrustOverrideForUrl = (sender, url, trust) => url.StartsWith("https://localhost")
    };
    return handler;
#elif WINDOWS || MACCATALYST
    return new HttpClientHandler()
    {
        UseCookies = false
    };
#else
     throw new PlatformNotSupportedException("Only Android, iOS, MacCatalyst, and Windows supported.");
#endif
}
Answer

Communicate via email. I'm closing this. free open if you needed.

Showing 2941 to 2950 of 6693 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.