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)
7 Answer(s)
-
1
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 yourSettingDefinitionProvider
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 ofIdentitySettingsAppService
to ensure that only the host admin can change it. -
0
Thanks for the reply. I have done what you have suggested and it works perfectly.
- 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.
- 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.
-
0
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
ofIdentityProSettingNames.Session.PreventConcurrentLogin
tofasle
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 👍
-
0
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?
-
0
hi
Then I guess you have to override the setting component.
-
0
Ok then thank you.
-
0
: )