Activities of "maliming"

hi

: )

hi

<PackageReference Include="Serilog.Expressions" Version="3.4.0" />

add .Filter.ByExcluding("RequestPath = '/.well-known/openid-configuration'")

Log.Logger = new LoggerConfiguration()
    .MinimumLevel.Information()
    .Filter.ByExcluding("RequestPath = '/.well-known/openid-configuration'")
    .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
    .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
    .Enrich.FromLogContext()
    .WriteTo.Async(c => c.File("Logs/logs.txt"))
    .WriteTo.Async(c => c.Console())
    .CreateLogger();

hi

I didn’t receive your project, Can you check again?

hi

Can you share a project to reproduce the problem?

I will download and check it.

Thanks.

liming.ma@volosoft.com

hi

The 9.0.6 has fixed this problem.

Here is a workaround if you can't update it now.

  1. Create a new Pages/Account/Components/ProfileManagementGroup/ProfilePicture/Default.js file in your project(that contain the account module)
  2. Update it as code below

The key changes are:

(function ($) {

    $(function () {
        var l = abp.localization.getResource('AbpAccount');

        var _accountService = volo.abp.account.account;

        var UPPY_UPLOAD_ENDPOINT = $("#uploadEndpoint").val();

        function getUppyHeaders() {
          var headers = {};
          headers[abp.security.antiForgery.tokenHeaderName] = abp.security.antiForgery.getToken();

          return headers;
        }

        var UPPY_OPTIONS = {
            endpoint: UPPY_UPLOAD_ENDPOINT,
            formData: true,
            fieldName: "ImageContent",
            method: "post",
            headers: getUppyHeaders(),
            getResponseData: function (responseText) {
                return {
                    url: ""
                };
            }
        };

        var UPPY = new Uppy.Uppy().use(Uppy.XHRUpload, UPPY_OPTIONS);

        var UPPY_FILE_ID = "uppy-upload-file";

        var fileInput = $("#ChangeProfilePictureForm").find("#Picture");

        var imageContainer = document.getElementById("image");
        imageContainer.addEventListener("ready", putSampleImages);
        imageContainer.addEventListener("cropmove", putSampleImages);
        imageContainer.addEventListener("zoom", putSampleImages);

        var cropper = null;
        var saveProfilePictureBtn = $("#SaveProfilePicture");
        var imageProcessSection = $("div.image-process-section");

        var ppTypeRadio = $(".pp-type-selector");
        var uploadFileContainer = $("div#UploadPPContainer");

        function getSelectedPPTypeValue() {
            return $("input[name=pptype]:checked", "#ChangeProfilePictureForm").val();
        }

        ppTypeRadio.change(function () {
            var selectedValue = getSelectedPPTypeValue();

            if (selectedValue === "use-picture") {
                uploadFileContainer.removeClass("hidden-section");
            } else {
                uploadFileContainer.addClass("hidden-section");

                if (cropper) {
                    $("ul.sample-images li").html("");
                    cropper.destroy();
                    imageContainer.src = "";
                    fileInput.val("");
                }
            }
        });

        var fr = new FileReader();
        fr.onload = function (e) {
            imageContainer.src = this.result;

            cropper = new Cropper(imageContainer, {
                aspectRatio: 1 / 1,
                viewMode: 1,
            });

            putSampleImages();
        };

        fileInput.change(function () {
            if (cropper) {
                cropper.destroy();
                cropper = null;
            }

            var cursorInfo = $('#CursorInfo');
            cursorInfo.removeClass('hidden-section');
            cursorInfo.addClass('cursor-info');

            fr.readAsDataURL($(this).prop("files")[0]);
            imageProcessSection.css("display", "initial");
        });

        function putSampleImages() {
            var places = [
                ["big", 250],
                ["medium", 150],
                ["small", 75],
            ];

            for (let i = 0; i < places.length; i++) {
                var place = places[i];
                var selector = "ul.sample-images li." + place[0];

                $(selector).html(
                    cropper.getCroppedCanvas({ width: place[1], height: place[1] })
                );
            }
        }

        saveProfilePictureBtn.click(function (e) {
            e.preventDefault();

            var $this = $(this);

            var message = null;
            var callBack = null;

            var selectedType = getSelectedPPTypeValue();

            if (selectedType === "use-gravatar") {
                // Use Gravatar

                message = l("UseGravatarConfirm");
                callBack = function (isConfirmed) {
                    if (!isConfirmed) {
                        return;
                    }

                    $this.buttonBusy();
                    _accountService
                        .setProfilePicture({ type: 1 })
                        .then(function (result) {
                            window.location.reload();
                        });
                };
            } else if (selectedType === "use-default") {
                message = l("NoProfilePictureConfirm");

                callBack = function (isConfirmed) {
                    if (!isConfirmed) {
                        return;
                    }

                    $this.buttonBusy();
                    _accountService
                        .setProfilePicture({ type: 0 })
                        .then(function (result) {
                            window.location.reload();
                        });
                };
            } else {
                if (!cropper) {
                    abp.message.warn(l("PleaseSelectImage"));
                    return;
                }

                var canvas = null;

                try {
                    canvas = cropper.getCroppedCanvas();
                } catch (e) {}

                if (canvas === null) {
                    abp.message.warn(l("PleaseSelectImage"));
                    return;
                }

                message = l("PPUploadConfirm");
                callBack = function (isConfirmed) {
                    if (!isConfirmed) {
                        return;
                    }
                    
                    $this.buttonBusy();

                    canvas.toBlob(function (blob) {
                        UPPY.cancelAll();

                        UPPY.addFile({
                            id: UPPY_FILE_ID,
                            name: fileInput[0].files[0].name, // file name
                            type: 2, // file type
                            data: blob, // file blob
                        });

                        UPPY.upload().then((result) => {
                            if (result.failed.length > 0) {
                                $this.buttonBusy(false);
                                abp.message.error(l("UploadFailedMessage"));
                            } else {
                                abp.notify.success(l('SavedSuccessfully'));
                                window.location.reload();
                            }
                        });
                    }, "image/jpeg", 0.95);
                };
            }
            abp.message.confirm(message, l("AreYouSure")).then(callBack);
        });
    });

})(jQuery);

hi

We dont have SAML to test this feature.

If you can provide the SAML login info, I can add it as a new login provider

Thanks.

hi

this error start when it is published to azure dev environment.

Ensure your wwwroot/libs folder is up to date in Azure.

It has to be the same as your local. You can check it.

Thanks

hi

Please test if these codes can improve the performance.

public override void ConfigureServices(ServiceConfigurationContext context)
{
   
    PostConfigure<PermissionManagementOptions>(options =>
    {
        options.ManagementProviders.Remove<UserPermissionManagementProvider>();
        options.ManagementProviders.Remove<RolePermissionManagementProvider>();
        
        options.ManagementProviders.Add<MyUserPermissionManagementProvider>();
        options.ManagementProviders.Add<MyRolePermissionManagementProvider>();
    });
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.PermissionManagement.Identity;

namespace MyCompanyName.MyProjectName.Web;

public class MyRolePermissionManagementProvider : RolePermissionManagementProvider
{
    public MyRolePermissionManagementProvider(IPermissionGrantRepository permissionGrantRepository, IGuidGenerator guidGenerator, ICurrentTenant currentTenant, IUserRoleFinder userRoleFinder) : base(permissionGrantRepository, guidGenerator, currentTenant, userRoleFinder)
    {
    }

    public async override Task<MultiplePermissionValueProviderGrantInfo> CheckAsync(string[] names, string providerName, string providerKey)
    {
        using (PermissionGrantRepository.DisableTracking())
        {
            var multiplePermissionValueProviderGrantInfo = new MultiplePermissionValueProviderGrantInfo(names);
            var permissionGrants = new List<PermissionGrant>();

            if (providerName == Name)
            {
                permissionGrants.AddRange(await PermissionGrantRepository.GetListAsync(names, providerName, providerKey));

            }

            if (providerName == UserPermissionValueProvider.ProviderName)
            {
                var userId = Guid.Parse(providerKey);
                var roleNames = await UserRoleFinder.GetRoleNamesAsync(userId);

                foreach (var roleName in roleNames)
                {
                    permissionGrants.AddRange(await PermissionGrantRepository.GetListAsync(names, Name, roleName));
                }
            }

            permissionGrants = permissionGrants.Distinct().ToList();
            if (!permissionGrants.Any())
            {
                return multiplePermissionValueProviderGrantInfo;
            }

            foreach (var permissionName in names)
            {
                var permissionGrant = permissionGrants.FirstOrDefault(x => x.Name == permissionName);
                if (permissionGrant != null)
                {
                    multiplePermissionValueProviderGrantInfo.Result[permissionName] = new PermissionValueProviderGrantInfo(true, permissionGrant.ProviderKey);
                }
            }

            return multiplePermissionValueProviderGrantInfo;
        }
    }
}

using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.PermissionManagement.Identity;

namespace MyCompanyName.MyProjectName.Web;

public class MyUserPermissionManagementProvider : UserPermissionManagementProvider
{
    public MyUserPermissionManagementProvider(IPermissionGrantRepository permissionGrantRepository, IGuidGenerator guidGenerator, ICurrentTenant currentTenant) : base(permissionGrantRepository, guidGenerator, currentTenant)
    {
    }

    public async override Task<MultiplePermissionValueProviderGrantInfo> CheckAsync(string[] names, string providerName, string providerKey)
    {
        var multiplePermissionValueProviderGrantInfo = new MultiplePermissionValueProviderGrantInfo(names);
        if (providerName != Name)
        {
            return multiplePermissionValueProviderGrantInfo;
        }

        using (PermissionGrantRepository.DisableTracking())
        {
            var permissionGrants = await PermissionGrantRepository.GetListAsync(names, providerName, providerKey);

            foreach (var permissionName in names)
            {
                var isGrant = permissionGrants.Any(x => x.Name == permissionName);
                multiplePermissionValueProviderGrantInfo.Result[permissionName] = new PermissionValueProviderGrantInfo(isGrant, providerKey);
            }

            return multiplePermissionValueProviderGrantInfo;
        }
    }
}

hi

Update your Program like that, then run your app. call https://localhost:44374/api/permission-management/permissions?providerName=R&providerKey=user then share the Logs.txt file

Thanks.

static async Task Main(string[] args)
{
    Log.Logger = new LoggerConfiguration()
                 .MinimumLevel.Debug()
                 .Enrich.FromLogContext()
                 .WriteTo.Async(c => c.File("Logs/logs.txt"))
                 .WriteTo.Async(c => c.Console())
                 .CreateLogger();
    await CreateHostBuilder(args).RunConsoleAsync();
}
Showing 2461 to 2470 of 11531 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.