"pablo@ccalp.net" 'in aktiviteleri

  • ABP Framework version: v7.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)

Is there a way to change the IdentityUser primary key from GUID to an Int? Is it possible to do this on an existing project with existing data (test data), if I need to regenerate the database it is not a problem.

Thank you.

  • ABP Framework version: v7.2.x
  • UI type: Angular
  • DB provider: EF Core

I need guidance to accomplish the following:

We need to implement a custom permissions system based on levels and not individual rights, so for example, a user or role will have one of the following levels on a feature or module:

Users => [ X ] Deny | [ ] Read | [ ] Write | [ ] Delete Roles => [ ] Deny | [ X ] Read | [ ] Write | [ ] Delete Feature A => [ ] Deny | [ ] Read | [ X ] Write | [ ] Delete Feature B => [ ] Deny | [ ] Read | [ ] Write | [ X ] Delete

What would be the best approach to extend, replace, or override the current behavior of the [Authorize] attribute, or would it be better to implement our own?

On the Angular side, I suppose we need to create our own guards and check the configuration to evaluate the permissions, or something along those lines.

Thanks.

  • ABP Framework version: v7.2
  • UI type: Angular
  • DB provider: EF Core

Hello, I need to extend the IdentityUser just for the tenants, I'm using the EfCoreEntityExtensionMappings class but when I run the migration I get an error because I assume that one of the foreign keys to a table that only exists in the tenant databases is not present in the host. How can I just extend the IdentityUser just for the tenants?

Extension mapping code here:

using CompuCare.Entities;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace CompuCare.EntityFrameworkCore;
public static class CompuCareEfCoreEntityExtensionMappings
{
    private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
    public static void Configure()
    {
        CompuCareGlobalFeatureConfigurator.Configure();
        CompuCareModuleExtensionConfigurator.Configure();

        OneTimeRunner.Run(() =>
        {
            ObjectExtensionManager.Instance
                .MapEfCoreProperty<IdentityUser, string>(
                    "SSN",
                    (entityBuilder, propertyBuilder) =>
                    {
                        propertyBuilder.HasMaxLength(9);
                    }
                )
                .MapEfCoreProperty<IdentityUser, int?>(
                    "DoctorId",
                    (entityBuilder, propertyBuilder) =>
                    {
                        propertyBuilder.IsRequired(false);
                        entityBuilder.HasOne(typeof(Entities.Doctor))
                            .WithMany()
                            .IsRequired(false);
                    }
                )
                .MapEfCoreProperty<IdentityUser, int?>(
                    "TypeId",
                    (entityBuilder, propertyBuilder) =>
                    {
                        propertyBuilder.IsRequired(false);
                        entityBuilder.HasOne(typeof(Entities.Type))
                            .WithMany()
                            .IsRequired(false);
                    }
                );
        });
    }
}

Migration that was created:

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CompuCare.TenantMigrations
{
    /// <inheritdoc />
    public partial class IdentityUserExtraProperties : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "DoctorId",
                table: "AbpUsers",
                type: "int",
                nullable: true);
            migrationBuilder.AddColumn<string>(
                name: "SSN",
                table: "AbpUsers",
                type: "nvarchar(9)",
                maxLength: 9,
                nullable: true);
            migrationBuilder.AddColumn<int>(
                name: "TypeId",
                table: "AbpUsers",
                type: "int",
                nullable: true);
            migrationBuilder.CreateIndex(
                name: "IX_AbpUsers_DoctorId",
                table: "AbpUsers",
                column: "DoctorId");
            migrationBuilder.CreateIndex(
                name: "IX_AbpUsers_TypeId",
                table: "AbpUsers",
                column: "TypeId");
            migrationBuilder.AddForeignKey(
                name: "FK_AbpUsers_Doctors_DoctorId",
                table: "AbpUsers",
                column: "DoctorId",
                principalTable: "Doctors",
                principalColumn: "Id");
            migrationBuilder.AddForeignKey(
                name: "FK_AbpUsers_Types_TypeId",
                table: "AbpUsers",
                column: "TypeId",
                principalTable: "Types",
                principalColumn: "Id");
        }
        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_AbpUsers_Doctors_DoctorId",
                table: "AbpUsers");
            migrationBuilder.DropForeignKey(
                name: "FK_AbpUsers_Types_TypeId",
                table: "AbpUsers");
            migrationBuilder.DropIndex(
                name: "IX_AbpUsers_DoctorId",
                table: "AbpUsers");
            migrationBuilder.DropIndex(
                name: "IX_AbpUsers_TypeId",
                table: "AbpUsers");
            migrationBuilder.DropColumn(
                name: "DoctorId",
                table: "AbpUsers");
            migrationBuilder.DropColumn(
                name: "SSN",
                table: "AbpUsers");
            migrationBuilder.DropColumn(
                name: "TypeId",
                table: "AbpUsers");
        }
    }
}
  • ABP Framework version: v7.2
  • UI type: Angular
  • DB provider: EF Core

I'm trying to create an entity with a DateOnly field type, but when creating a migration I'm getting the following message:

The 'DateOnly?' property 'AccountingDeposit.BankPostingDate' could not be mapped to the database type 'date' because the database provider does not support mapping 'DateOnly?' properties to 'date' columns. Consider mapping to a different database type or converting the property value to a type supported by the database using a value converter. See https://aka.ms/efcore-docs-value-converters for more information. Alternately, exclude the property from the model using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.

I'm using a value converter as suggested.

protected override void ConfigureConventions(ModelConfigurationBuilder builder)
{
    builder.Properties&lt;DateOnly&gt;()
        .HaveConversion&lt;DateOnlyConverter&gt;()
        .HaveColumnType("date");

    base.ConfigureConventions(builder);
}

Please advice on how to proceed.

  • ABP Framework version: v7.0.x
  • UI type: Angular
  • DB provider: EF Core

Need guidance on the following: I need to create a separate application for report processing but need to be able to authenticate and read the claims of the user requesting the reports using the same credentials from the application to be able to know the tenantid and connect to the right database. The reports will be displayed in the angular application in an iframe.

  • ABP Framework version: v7.0
  • UI type: Angular
  • DB provider: EF Core

Trying to replace the logo component using the ReplaceableComponentsService but not working, don't see any change. Replacing other components work fine.

  • ABP Framework version: v7.0
  • UI type: Angular
  • DB provider: EF Core

I want to implement a background job using the framework (abp) default implementation. I created a Domain service and I'm passing the tenantid as a parameter and then changing the CurrentTenant. I'm also getting the DbContext from the repository to query the database, but getting an exception saying that it cannot access a disposed context. What is the right approach to be able to create multitenant aware background jobs? I would need to get the user ingo that submitted the job too.

  • ABP Framework version: v7.0.3
  • UI type: Angular
  • DB provider: EF Core
  • Steps to reproduce the issue:"

Just upgraded to the latest version and now I'm experiencing an issue when logging out, it redirects me to this page "https://localhost:44349/connect/logout?" and the page is blank. Before the migration, it used to redirect me to the login page.

Also when logging out, now I'm seeing that the post_logout_redirect_url is ivalid. The logout request was rejected because the specified post_logout_redirect_uri was invalid: https://tenanta.ccalp.net.

This is a multitenant app, so I need to set a wildcard url in openiddict but it is not letting me.

I'm using Resource Owner Password Flow in Angular, and the Domain Tenant Resolver.

18 kayıttan 11 ile 18 arası gösteriliyor.
Made with ❤️ on ABP v8.2.0-preview Updated on Mart 25, 2024, 15:11