alexander.nikonov的活动

  • ABP Framework version: vX.X.X
  • UI type: Angular / MVC / Blazor
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

After upgrading from ABP 5.1.2 to 7.0.1 I cannot add a claim to "Owned" When I'm trying to move any claim from right to left:

I am getting JS exception (because the given property is "undefined"):

The same goes for Identity Resources (and maybe other sections like this).

FYI: we keep using Identity Server, not Open ID Dict - probably it has something to do with this.

Please lead me in the right direction to fix this - I cannot share the code and we need to make this setup working ASAP, since the newly added solution cannot be run.

  • ABP Framework version: v7.0.1
  • UI type: Angular
  • DB provider: EF Core
  • Identity Server Separated (Angular)

We would like to implement the logic which implies assigning permissions to a custom role, while such custom role in turn is assigned to a standard role of the system. Could you please advice how can we fulfil such task by means of ABP framework?

  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Identity Server Separated (Angular)

I have a couple of issues / questions with the migration.

Server side: probably because of absent Devart Oracle driver which supports .NET 7.0+ the Add-Migration causes the following error (please note that we have set target=NET7 for all our projects):

Return type in method 'Devart.Common.Entity.c5.FindMapping(System.Type)' on type 'Devart.Common.Entity.c5' from assembly 'Devart.Data.Oracle.Entity.EFCore, Version=9.16.1434.0, Culture=neutral, PublicKeyToken=09af7300eec23701' is not compatible with base type method 'Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingSource.FindMapping(System.Type)'.

The Add-Migration itself with the standard driver completes successfully, but when I run Update-Database - very soon I end up with the errors related to Upper / Lower case in Table/Column names + quotes around those. We did not have such problems with Devart thanks to these options:

        var config = Devart.Data.Oracle.Entity.Configuration.OracleEntityProviderConfig.Instance;
        config.Workarounds.DisableQuoting = true;
        config.CodeFirstOptions.UseNonLobStrings = true;
        config.CodeFirstOptions.UseNonUnicodeStrings = true;

How to make a successful migration? Sorry - I cannot share the source code.

Client side: it is not clear which version of Angular should we use now, with ABP 7.0.1. We have had Angular 13 so far...I've tried to upgrade Angular after using abp update, but faced the compilation problem for our Angular packages, similar to these, but related to ng-bootstrap and other material components. So what Angular version should we use? Should we upgrade from version 13 and how to make it correct?

  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Identity Server Separated (Angular)

I am trying to create a custom implementation of IPermissionChecker in the shared project and consume this implementation in several projects. Currently I'm having the problem with this implementation. Here is the checker:

[Dependency(ReplaceServices = false)]
public class AbxPermissionChecker : IPermissionChecker
{
    private PermissionChecker _abpPermissionChecker;
    private IServiceProvider _serviceProvider;
    private readonly ILicencePermissionChecker _licencePermissionChecker;

    public AbxPermissionChecker
    (
        PermissionChecker abpPermissionChecker,
        IServiceProvider serviceProvider,
        ILicencePermissionChecker licencePermissionChecker
    )
    {
        _abpPermissionChecker = abpPermissionChecker;
        _serviceProvider = serviceProvider;
        _licencePermissionChecker = licencePermissionChecker;
    }

    public async Task<bool> IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string name)
    {
        using var scope = _serviceProvider.CreateScope();

        var abxRequestContext = scope.ServiceProvider.GetRequiredService<IAbxRequestContext>();

        return await _licencePermissionChecker.IsGrantedAsync(abxRequestContext.AbxTenantId, abxRequestContext.AbxModuleId) && await _abpPermissionChecker.IsGrantedAsync(claimsPrincipal, name);
    }

    public Task<bool> IsGrantedAsync(string name)
    {
        return _abpPermissionChecker.IsGrantedAsync(name);
    }

    public Task<MultiplePermissionGrantResult> IsGrantedAsync(string[] names)
    {
        return _abpPermissionChecker.IsGrantedAsync(names);
    }

    public Task<MultiplePermissionGrantResult> IsGrantedAsync(ClaimsPrincipal claimsPrincipal, string[] names)
    {
        return _abpPermissionChecker.IsGrantedAsync(claimsPrincipal, names);
    }
}

public class PermissionManager : DomainService
{
    private readonly IRepository<Tenant, int> _tenantRepository;
    private readonly IRepository<ModuleLicence> _moduleLicenceRepository;
    private readonly IRepository<CompanyLicence> _companyLicenceRepository;

    public PermissionManager
    (
        IRepository<Tenant, int> tenantRepository,
        IRepository<ModuleLicence> moduleLicenceRepository,
        IRepository<CompanyLicence> companyLicenceRepository
    )
    {
        _tenantRepository = tenantRepository;
        _moduleLicenceRepository = moduleLicenceRepository;
        _companyLicenceRepository = companyLicenceRepository;
    }

    public async Task<List<string>> GetAccessibleModulesAsync(int abxTenantId)
    {
        var tenants = await _tenantRepository.GetQueryableAsync();
        var companyLicences = await _companyLicenceRepository.GetQueryableAsync();
        var moduleLicences = await _moduleLicenceRepository.GetQueryableAsync();

        var query = from tenant in tenants.Where(x => x.Id == abxTenantId).Take(1)
                    join companyLicence in companyLicences on tenant.CompanyId equals companyLicence.CompanyId
                    join moduleLicence in moduleLicences on companyLicence.LicenceId equals moduleLicence.LicenceId
                    select moduleLicence.ModuleId;

        return query.Distinct().ToList();
    }
}

The exception I'm getting in the consuming project when accessing PermissionManager method:

Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController -> Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationAppService -> AbxEps.CT.Core.Permissions.AbxPermissionChecker -> AbxEps.CT.Core.Permissions.AbxLicencePermissionChecker -> AbxEps.CT.Core.Permissions.PermissionManager. ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'AbxEps.CT.Core.Permissions.PermissionManager' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.Domain.Repositories.IRepository2[AbxEps.CT.Core.Tenants.Tenant,System.Int32] tenantRepository' of constructor 'Void .ctor(Volo.Abp.Domain.Repositories.IRepository2[AbxEps.CT.Core.Tenants.Tenant,System.Int32], Volo.Abp.Domain.Repositories.IRepository1[AbxEps.CT.Core.ModuleLicences.ModuleLicence], Volo.Abp.Domain.Repositories.IRepository1[AbxEps.CT.Core.CompanyLicences.CompanyLicence])'.

Now let me explain what I'm trying to achieve. CoreDbContext in the shared project contains SIMPLIFIED models of entities which are ALREADY bound in the consuming project. Since I cannot bind the model to the same table name twice in the same DbContext as well as I don't want to MOVE a complex model binding from consuming project to the shared project, I decided to use two independent DbContext:

public static void ConfigureCore(
    this ModelBuilder builder,
    Action<CoreModelBuilderConfigurationOptions> optionsAction = null
) {
    builder.Entity<CompanyLicence>(b =>
    {
        b.ToTable("CT_CA_COMP_LIC", CentralToolsConsts.DbSchema);
        .... simplified binding
    }

public static void ConfigureConsuming(
    this ModelBuilder builder,
    Action<ConsumingModelBuilderConfigurationOptions> optionsAction = null
) {
    builder.Entity<CompanyLicence>(b =>
    {
        b.ToTable("CT_CA_COMP_LIC", CentralToolsConsts.DbSchema);
        .... advanced binding
    }
  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Identity Server Separated (Angular)

What is correct way to authorize RabbitMQ user so that I could invoke AppService methods from RabbitMQ receiver or sender? In the meantime both CurrentTenant and CurrentUser are null. Please write the example of the code.

  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Identity Server Separated

I have installed AbpAspNetCoreSignalRModule into HttpApi.Host project and put it into Module dependencies. I also used the following setup:

    Configure<AbpSignalROptions>(options =>
    {
        options.Hubs.AddOrUpdate(
            typeof(NotificationHub),
            config =>
            {
                config.RoutePattern = "/signalr-hubs/notification";
                config.ConfigureActions.Add(hubOptions =>
                {
                    //Additional options
                    hubOptions.LongPolling.PollTimeout = TimeSpan.FromSeconds(30);
                });
            }
        );
    });

The code above is followed by ConfigureSwagger setup. Nevertheless, I don't see signalr-hubs/notification endpoint at my Swagger page. I even installed Swagger extension from Nuget, but I still can't see this endpoint. WHY? This is question #1.

Question #2. Why Angular app does not work with SignalR?

    @Injectable({
      providedIn: 'root'
    })
    export class SignalRService {
    
      private hubConnection: signalR.HubConnection
        public startConnection = () => {
          this.hubConnection = new signalR.HubConnectionBuilder()
            .withUrl
            (
              `${environment.apis['default'].url}/signalr-hubs/notification`,
              { skipNegotiation: true, transport: signalR.HttpTransportType.WebSockets }
            )
            .build();
          this.hubConnection
            .start()
            .then(() => console.log('Connection started'))
            .catch(err => console.log('Error while starting connection: ' + err))
        }
        
        public addNotificationListener = () => {
          this.hubConnection.on('notificationreceived', (data) => {
            console.log(data);
          });
        }
    }

The error is:

Probably something is not fully correct with my Ocelot gateway settings, but I am even not sure the Hub endpoint is available. How do I check this??

    {
        "DownstreamPathTemplate": "/signalr-hubs/notification",
        "DownstreamScheme": "wss",
        "DownstreamHostAndPorts": [
            {
                "Host": "localhost",
                "Port": 44328
            }
        ],
        "UpstreamPathTemplate": "/centraltool/signalr-hubs/notification",
        "UpstreamHttpMethod": [ "GET", "POST", "PUT", "DELETE" ],
        "Key": "centraltool-signalr"
    },

Anticipating your question: no, I cannot send the project. And we have no time trying to make things work in the test project: our setup is more complex and it would not help us in any way if we find out the test sample DOES work. Please help us to understand, what is wrong here. Step by step.

Thank you.

ABP Framework version: v5.1.2 UI type: Angular DB provider: EF Core Identity Server Separated (Angular)

Hello

I use the class implementing IAuditingStore interface to catch all the errors in our application. I would like to use this class as a proxy: for this I inject ABP object implementing IAuditLogRepository interface.

I've faced the issue while trying to save an error (It looks like task has been canceled by ABP logic) - see the picture attached:

This logic used to work well on the previous versions of ABP framework. What is wrong now?

  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): separated Identity Server

Hi. We would like to add information about missing permission for an error page (403 Forbidden) in Angular application when a user uses direct link to some page. We tried to use HTTP_ERROR_HANDLER provider, but the HttpErrorResponse object doesn't have any informations about missing permissions. Could you please extend this object or advice how we can get the information about missing permissions for a user?

  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

OracleRelationalCommand.ExecuteReaderAsync() : Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-12899: value too large for column "ABDEV"."ABPAUDITLOGS"."EXCEPTIONS" (actual: 15651, maximum: 4000)

Hi. I faced with the situation that some exception cannot be stored because the value is too large for column "ABPAUDITLOGS"."EXCEPTIONS". At this moment I use "Volo.Abp.AuditLogging" module version 5.1.2. Unfortunatly, I didn't manage to find any logic in this module which can truncate too large text of exception. Could you please advice how this issue can be fixed? Not by incrementing the column length.

4.3.0 / Angular / separate IdentityServer

I have custom implementation of IAuthorizationMiddlewareResultHandler (it checks missing permissions for a user) and I want to provide additional exception info from it to Angular client in pop-up window. It works in some scenarios - like the page is accessed from navigation menu and it misses some permission. But if I try to access the page which is not accessible via typing its address in a browser - I ALWAYS get the following page without details:

显示 37 个条目中的 11 到 20 个.
Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11