Starts in:
1 DAY
22 HRS
59 MIN
48 SEC
Starts in:
1 D
22 H
59 M
48 S

Activities of "XavierRM"

Thanks, that's a good start. I can get the custom page settings to show, but I can't get it to show only to users having the right permission.

Here is what I have in my settings page contributor :

public class EmailSettingsPageContributor : ISettingPageContributor
{
    public async Task<bool> CheckPermissionsAsync(SettingPageCreationContext context)
    {
        Check.NotNull(context, nameof(context));
        var permissionChecker = context.ServiceProvider.GetRequiredService<IPermissionChecker>();

        var result = await permissionChecker.IsGrantedAsync(MyAppPermissions.EmailSettings.Edit);
        return result;
    }

    public Task ConfigureAsync(SettingPageCreationContext context)
    {
        Check.NotNull(context, nameof(context));
        var localizer = context.ServiceProvider.GetRequiredService<IStringLocalizer<MyAppResource>>();

        context.Groups.Add(new SettingPageGroup("emailsPageGroup", localizer["Settings:Email"], typeof(EmailSettingsViewComponent)));
        return Task.CompletedTask;
    }
}

It seems CheckPermissionsAsync is never called, and my settings pages is always displayed.

We found what the problem was. Someone tinkered with the menu providers and the account menu provider was removed. Sorry for bothering you

Thank you for your answer. We already have this module installed. Here is our current modules list (for the Web project) :

    [DependsOn(
        typeof(MyProjectHttpApiModule),
        typeof(MyProjectApplicationModule),
        typeof(MyProjectEntityFrameworkCoreDbMigrationsModule),
        typeof(AbpAutofacModule),
        typeof(AbpIdentityWebModule),
        typeof(AbpAccountPublicWebIdentityServerModule),
        typeof(AbpAuditLoggingWebModule),
        typeof(LeptonThemeManagementWebModule),
        typeof(AbpAccountAdminWebModule),
        typeof(AbpIdentityServerWebModule),
        typeof(LanguageManagementWebModule),
        typeof(AbpAspNetCoreMvcUiLeptonThemeModule),
        typeof(TextTemplateManagementWebModule)
        )]

Do you have any other suggestion ?

Showing 1 to 3 of 3 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06