Open Closed

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


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)
  • 0
    maliming created
    Support Team

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

  • -1
    musa.demir created
    Support Team

    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.

  • 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?

  • 0
    maliming created
    Support Team

    hi @smry I will check it again.

  • 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

  • 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

  • 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

  • 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

  • 0
    musa.demir created
    Support Team

    Hi @smry Did you solve it?

  • 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

  • 0
    musa.demir created
    Support Team

    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.

  • 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.