• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    User permissions for editing dashboards

    Dashboard Designer & Custom AngularJS Pages
    2
    6
    2.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • AldoRamosA
      AldoRamos
      last edited by

      I recently allowed one of our techs limited access to a running Mango. She is now exploring dashboards, and keeps getting errors saving/viewing her work. In exploring, I discovered that I could only enable her to do so by giving her superadmin (not just admin) permission. Is this correct? I would hope I could let her do her work as a user without having to worry about potential mistakes that might harm the running environment.

      Please help me better understand this issue.

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hi Aldo,

        Tis a bug you are describing. Caught and modified. You can fix this yourself, and it will be in the next version of the module. To fix, you'll need to edit two files in the dashboards module. You may need to clear the browser cache, but you will not need to restart.

        1. Mango/web/modules/dashboards/web/js/mango-3.0/directives/jsonStore.js
          Add between lines 28-29:
        angular.extend(item, $scope.item);
        
        1. Mango/web/modules/dashboards/web/mdAdmin/views/examples/playArea.html
          change...
        <ma-json-store xid="play-area-{{user.username}}" item="playArea" value="paVal"></ma-json-store>
        

        to...

        <ma-json-store xid="play-area-{{user.username}}" item="playArea" value="paVal"
           ng-init="playArea={readPermission: 'user', editPermission: 'user'}">
         </ma-json-store>
        

        as described in this commit: https://github.com/infiniteautomation/ma-dashboards/commit/d0d51811c2a1bf1f9139eb391bb271111c0a5dfd

        Note that the user will need to have the permissions group 'user'

        1 Reply Last reply Reply Quote 0
        • AldoRamosA
          AldoRamos
          last edited by

          Thanks, but I've implemented your changes and I still get the error. While I can see the changes in the "Result" window, when I save, then go to "Play Area View Only" I get nothing, but the REST API errors shows:
          Mango REST API errors
          Jul 27, 2016 1:41 PM
          401 Unauthorized
          GET /rest/v1/json-data/play-area-Sue

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            My sincerest apologies! I forgot to say you'll want to update the database via the SQL console for the record that already exists, something like,

            update jsonData set readPermission='user', editPermission='user' where name='play-area-Sue'
            

            Sorry!

            1 Reply Last reply Reply Quote 0
            • AldoRamosA
              AldoRamos
              last edited by

              Yes! That fixed it (although oddly it didn't seem to actually update the db on my first attempt); Thanks!

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by phildunlap

                No problem, thanks for bringing it to our attention! Also, in case you didn't see it, Will just posted a link to some video tutorials for getting going with Angular and the dashboards: http://infiniteautomation.com/forum/topic/2377/mango-dashboard-3-x-video-training-series

                Could be interesting for you or your tech!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post