Activities of "maliming"

hi

You should make the remember feature invalidate when the user's 2fa changes. This can be complicated.

We will introduce the session management feature in 8.2.

  • [x] Automatically terminate a user session if the same user is logging in with another "same type of device"
  • [x] Make it optional with a setting that can be dynamically changed on the settings page (per tenant), with the following options: Disabled, Logout from same type devices, Logout from all devices.
  • [x] "same type of device" means we can restrict single login with browser, but we may still can login with a mobile application without affecting the browser session. So, for each device type, we may allow a single login. It would be better to enable or disable that restriction per device type.
  • [x] Add a new row action in the user management page, like "Sessions". Open a new modal when we click it.
  • [x] In the "Sessions" modal, show user's currently active sessions (with login time, last activity time, device type). Here, we may "force logout" any session.

hi

the existing database will still be used by other systems so we don't need to change it,

You don't need to change the database and tables.

You need to :

  1. create the entity/aggregate root classes
  2. add your entity classes to DbContext class. DbSet
  3. configure your entity classes in OnModelCreating method of DbContext
  4. Inject the repository and test it.

hi

Our project is just a net core app. You can build it locally, which means it is no problem.

Is it possible to compile your trial project with bitbucket runner?

You can try following:

  1. use dotnet build /graphBuild to replace dotnet build command.
  2. build a plain asp net core web app in your runner to ensure the environment is fine.

hi

You can add the scope to your TokenRequest parameter.

https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs#L168

Example:

ar client = new HttpClient();

var response = await client.RequestTokenAsync(new TokenRequest
{
    Address = "https://demo.identityserver.io/connect/token",
    GrantType = "custom",

    ClientId = "client",
    ClientSecret = "secret",

    Parameters =
    {
        { "custom_parameter", "custom value"},
        { "scope", "api1" }
    }
});

hi

You can add your code to MyExtensionProperties.razor

MyExtensionProperties.razor

@typeparam TEntityType
@typeparam TResourceType
@using Volo.Abp.Data
@using Volo.Abp.ObjectExtending
@inherits Volo.Abp.BlazoriseUI.Components.ObjectExtending.ExtensionProperties<TEntityType, TResourceType>

@{
    Entity.SetDefaultsForExtraProperties();

    foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties<TEntityType>())
    {
        if (!propertyInfo.Name.EndsWith("_Text"))
        {
            if (propertyInfo.Type.IsEnum)
            {
                <SelectExtensionProperty PropertyInfo="@propertyInfo" Entity="@Entity" TEntity="TEntityType" TResourceType="TResourceType" LH="@LH" />
            }
            else if (!propertyInfo.Lookup.Url.IsNullOrEmpty())
            {
                <LookupExtensionProperty PropertyInfo="@propertyInfo" Entity="@Entity" TEntity="TEntityType" TResourceType="TResourceType" LH="@LH" />
            }
            else
            {
                var inputType = BlazoriseUiObjectExtensionPropertyInfoExtensions.GetInputType(propertyInfo);
                __builder.OpenComponent(0, inputType.MakeGenericType(new[] { typeof(TEntityType), typeof(TResourceType) }));
                __builder.AddAttribute(1, "PropertyInfo", propertyInfo);
                __builder.AddAttribute(2, "Entity", Entity);
                __builder.AddAttribute(3, "LH", LH);
                __builder.AddAttribute(4, "ModalType", ModalType);
                __builder.CloseComponent();
            }
        }
    }
}

MyExtensionProperties.razor.cs

using Volo.Abp.BlazoriseUI.Components.ObjectExtending;
using Volo.Abp.Data;

namespace BookStore.Blazor.Components;

public partial class MyExtensionProperties<TEntityType, TResourceType> : ExtensionProperties<TEntityType, TResourceType>
    where TEntityType : IHasExtraProperties
{

}

Replace the ExtensionProperties in DI.

public override void ConfigureServices(ServiceConfigurationContext context)
{
    context.Services.Replace(ServiceDescriptor.Transient(
        typeof(ExtensionProperties<IdentityUserCreateDto, IdentityResource>),
        typeof(MyExtensionProperties<IdentityUserCreateDto, IdentityResource>)));

    context.Services.Replace(ServiceDescriptor.Transient(
        typeof(ExtensionProperties<IdentityUserUpdateDto, IdentityResource>),
        typeof(MyExtensionProperties<IdentityUserUpdateDto, IdentityResource>)));
}

hi

I will share the code. wait a monent.

hi

Could we modify in both razor and code behind?

Yes.

Where do I put this code line?

In your blazor project, eg the Component folder.

Answer

hi

We are working on it. Sorry for that.

hi

I tried again and I get same error Object Disposed when attempt to use FirstOrDefaultAsync method without UnitOfManager.Begin method but I use UOW.Begin method then no problem code work fine. I added an image relation to error.

  • If you are not injecting the service over an interface (like IMyService), then the methods of the service must be virtual (otherwise, dynamic proxy / interception system can not work).

Can you share a new template project to reproduce this error? liming.ma@volosoft.com

Thanks.

hi

We have a problem with the abp.io website, which will be fixed ASAP.

Showing 6571 to 6580 of 12925 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.8.0-preview. Updated on November 11, 2026, 08:10
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.