Thanks as always @liangshiwei
This was very helpful!
Hi,
you can try
services.ConfigureApplicationCookie(options => { options.ExpireTimeSpan = TimeSpan.FromMinutes(10); options.SlidingExpiration = true; });
We added this and it had no affect. The user continues to stay logged in after the specified ExpireTimeSpan. During that timespan, no requests were sent to the server.
ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi We have a javascript implementation that will auto logout a user after a certain period of inactivity in the browser which works great.
We'd like to enhance security by providing a server level timeout. Currently if a logged in user closes the browser tab. The user is perpetually still logged in when navigating back to the app.
Is there a way to configure an ABP Blazor Server solution to auto logout/expire a session after a certain period of inactivity at the server level?
Thanks in advance.
That makes sense. Thanks @liangshiwei !!
ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi,
Our custom SettingComponentContributor
is defined as below. What we are finding is that the ConfigureAsync
method executes, but the CheckPermissionsAsync
method never executes. The group shows in the UI without the permission check. Is there something we are misunderstanding when it comes to only showing a settings group if the current user has a certain permission?
Thanks in advance.
namespace FM.nVision.Blazor.Settings
{
public class NotificationSettingComponentContributor : ISettingComponentContributor
{
public Task ConfigureAsync(SettingComponentCreationContext context)
{
context.Groups.Add(
new SettingComponentGroup(
"FM.nVision.Settings",
"Email Notifications",
typeof(NotificationSettingGroupComponent), order: 8888
)
);
return Task.CompletedTask;
}
public async Task<bool> CheckPermissionsAsync(SettingComponentCreationContext context)
{
// check the permissions here
var authService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
if (await authService.IsGrantedAsync(nVisionPermissions.Notifications.Settings))
{
return true;
}
return false;
}
}
}
ConfigureServices
Configure<SettingManagementComponentOptions>(options =>
{
options.Contributors.Add(new NotificationSettingComponentContributor());
options.Contributors.Add(new AboutSettingComponentContributor());
});
Thanks @liangshiwei
We solved the issue by specifiying Api.* properties. It was not obvious to do this since we are using blazor server.
property.Api.OnGet.IsAvailable = false;
property.Api.OnUpdate.IsAvailable = false;
property.Api.OnCreate.IsAvailable = false;
Abp Commercial 7.4.2/ Blazor Server / EF Core / Non-tiered
Hi,
We reported the following with version 5.2.0 and, 2 years later, on version 7.4.2, we are still experiencing this problem https://abp.io/support/questions/2886/Bug-with-Extended-Properties-being-controlled-in-the-UI-for-Dependent-Modules
Please advise and let us know of any possible workaround while this gets fixed.
Thanks
ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi, We have extended identityuser to include several new properties to determine if certain application specific email notifications are turned on for the users 'my account' area.
We then successfully added a new 'Email Notifications' profile group under the 'my account' area (see last image below).
A new model NotificationsInfoModel
is declared in our GroupViewComponent
for notifications and this model is used in our default.cshtml page for notifications.
Our default.cshtml page is defined as follows...
@model FM.nVision.Blazor.Pages.Account.Components.ProfileManagementGroup.Notifications.AccountProfileNotificationsGroupViewComponent.NotificationsInfoModel
<form id="NotificationsForm">
<div class="mb-3">
<h4 class="pt-2 pb-3">@L["Time Off Requests"]</h4>
<abp-row class="pb-4">
<abp-column>
<div>Submit Confirmation</div>
<div class="text-subtle">Occurs every time you submit a time off request</div>
</abp-column>
<abp-column>
<div class="form-switch ps-2">
<abp-input asp-for="NotifyTimeOffRequestSubmit" class="mb-4" />
</div>
</abp-column>
</abp-row>
...
</div>
<abp-button type="submit" button-type="Primary" text="@L["Submit"].Value" />
</form>
Our question is how do we handle the server side action that is performed when the submit button is clicked? We looked at the abp implementation of 'Personal Info', 'Change Password', etc. but we can't determine what gets executed when the submit button gets clicked. What makes that determination? We are not that familiar with MVC as we are building a Blazor Server application.
We essentially want to call an new method to an overridden ProfileAppService that contains a new method to save email notification preferences.
Any guidance is greatly appreciated. Thank you.
Hi liangshiwei,
Thank you for the guidance. I'll be giving your approach a try...