Base solution for your next web application
Open Closed

Multi-Tenancy and User Permissions - Custom Dashboard Widgets #8307


User avatar
1
palmtreefrb created

I want to allow Tenent "Users" to view the Custom Dashboard Widgets. When I enable Dashboard permission for the User I am encountering a client side error below. Now the strange thing is, if I enable all Administration permissions for the user no errors are generated.

ERROR TypeError: Cannot read property 'filters' of undefined
    at Object.eval [as updateDirectives] (CustomizableDashboardComponent.html:25)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:30042)
    at checkAndUpdateView (core.js:29438)
    at callViewAction (core.js:29679)
    at execComponentViewsAction (core.js:29621)
    at checkAndUpdateView (core.js:29444)
    at callViewAction (core.js:29679)
    at execComponentViewsAction (core.js:29621)
    at checkAndUpdateView (core.js:29444)
    at callViewAction (core.js:29679)
    ```

12 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi palmtreefrb please follow: https://github.com/aspnetzero/aspnet-zero-core/pull/2888

  • User Avatar
    -1
    musa.demir created

    Hi @palmtreefrb, thanks for informing us about that issue. Pr was merged. You can change your code according to pr or wait for update to v8.2. If it still exist for you, write us again we will be here to help you.

  • User Avatar
    0
    smry created

    I pulled the updates into my branch and now the page isnt failing immediately but when I try to add pages I get TypeError: Cannot read property 'pages' of undefined

    was the PR tested and is this the final correction to this issue?

  • User Avatar
    0
    maliming created
    Support Team

    hi @smry I will check it again.

  • User Avatar
    0
    maliming created
    Support Team

    I can’t reproduce the problem you mentioned using dev branch code. Can you reproduce it? If possible, please share the steps, thank you

  • User Avatar
    0
    smry created

    https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Developing-Angular-Customizable-Dashboard

    followed that and kept getting the filters error Updated to add the changes in the PR and it fixed the page so that it loaded but default dashboard was blank Tried to add a page and it failed

  • User Avatar
    0
    maliming created
    Support Team

    hi @smry

    Did you modify DashboardConfiguration.cs at the same time? https://github.com/aspnetzero/aspnet-zero-core/pull/2888/files#diff-ea9fe51086542c35bab95936061cd29dR1-R58

  • User Avatar
    0
    smry created

    right, I updated the 3 files in the PR After doing so it stopped failing with the issue - however trying to edit the dashboard and add a page it fails

  • User Avatar
    0
    musa.demir created

    Hi @smry Did you solve it?

  • User Avatar
    0
    smry created

    we are unable to add custom widgets and have moved on to other application priorities My plan at this time is to continue working on other items and hope that this has been corrected on v.8.2.0

  • User Avatar
    0
    musa.demir created

    Can you please share your error message with more information to reproduce it so that I can check the problem. Or if you have a project that contains the same error, I can check that too.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because of no recent activity. Please create a new issue if you are still having this problem.