Open Closed

Disabling Changing Concurrent Login Option For Tenants #7484


User avatar
3
kkmy created

Hello,

With the version 8.2.0, you have provided the feature of changing the behavior for the concurrent login ("Disabled", "Logout from same type devices" and "Logout from all devices"). However, this option can be changed by each tenant admin under the settings menu.

How can I set the behavior for all the tenants as superadmin (admin without a tenant) and make sure that tenant admins cannot change it in any case?

Thank you.

  • ABP Framework version: v8.2.0
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

7 Answer(s)
  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    How can I set the behavior for all the tenants as superadmin (admin without a tenant)

    Get IdentityProSettingNames.Session.PreventConcurrentLogin definition and change the default value in your SettingDefinitionProvider

    new SettingDefinition(IdentityProSettingNames.Session.PreventConcurrentLogin,
       IdentityProPreventConcurrentLoginBehaviour.Disabled.ToString(),
       L("DisplayName:Abp.Identity.PreventConcurrentLogin"),
       L("Description:Abp.Identity.PreventConcurrentLogin"),
       true)
    

    make sure that tenant admins cannot change it in any case?

    You can override the UpdateSessionAsync method of IdentitySettingsAppService to ensure that only the host admin can change it.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    kkmy created

    Thanks for the reply. I have done what you have suggested and it works perfectly.

    1. Is it possible to hide this Sessions tab without overriding the Angular component? It would be the best if I can just override the GetList method and remove this tab.
    2. To be a reference for the people who are looking for a similar functionality, the part "IdentityProPreventConcurrentLoginBehaviour.Disabled.ToString()" does not disable the concurrent login, it disables the functionality to prevent concurrent login. You have to give either "LogoutFromAllDevices" or "LogoutFromSameTypeDevices" options to prevent. I just wanted to clarify as the term can be confusing.
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Is it possible to hide this Sessions tab without overriding the Angular component? It would be the best if I can just override the GetList method and remove this tab.

    I'm not sure about angular. You can try to set IsVisibleToClients of IdentityProSettingNames.Session.PreventConcurrentLogin to fasle

    To be a reference for the people who are looking for a similar functionality, the part "IdentityProPreventConcurrentLoginBehaviour.Disabled.ToString()" does not disable the concurrent login, it disables the functionality to prevent concurrent login. You have to give either "LogoutFromAllDevices" or "LogoutFromSameTypeDevices" options to prevent. I just wanted to clarify as the term can be confusing.

    Thanks 👍

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    kkmy created

    I'm not sure about angular. You can try to set IsVisibleToClients of IdentityProSettingNames.Session.PreventConcurrentLogin to fasle

    Unfortunately, this does not work. Do you have any other suggestions or is it not provided in the framework?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Then I guess you have to override the setting component.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    kkmy created

    Ok then thank you.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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 September 21, 2026, 06:18
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.