Open Closed

Angular: Information is absent about missing permissions in an error handling page #3130


User avatar
0
alexander.nikonov created
  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): separated Identity Server

Hi. We would like to add information about missing permission for an error page (403 Forbidden) in Angular application when a user uses direct link to some page. We tried to use HTTP_ERROR_HANDLER provider, but the HttpErrorResponse object doesn't have any informations about missing permissions. Could you please extend this object or advice how we can get the information about missing permissions for a user?


3 Answer(s)
  • User Avatar
    0
    alper created
    Support Team Director

    is this the same with https://support.abp.io/QA/Questions/2993/HttpErrorComponent-changed-behavior-in-514

  • User Avatar
    0
    alexander.nikonov created

    Hi. Not exactly.

    I use the RequiredPolicy options for routing configuration of an application menu. It allows me to limit the displayed menu items based on user permissions. When a user tries to navigate to the page directly - he sees 403 error page. I would like to show information about a missing permission here. But HttpErrorResponse object doesn't contain such information. I've made the research of JS code and found out that the inner logic doesn't include it for HttpErrorResponse object. Please see the corresponding part of your source code below:

  • User Avatar
    0
    alper created
    Support Team Director

    currently there's no support for a custom message in 403 responses. but we are thinking about adding this as a feature

Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19