• 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

    Permissions and watchlist dropdown configuration

    Dashboard Designer & Custom AngularJS Pages
    2
    13
    2.3k
    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.
    • P
      Phillip Weeks
      last edited by Phillip Weeks

      It seems that when I save a dynamic watchlist default parameter to which the user has access, all available deviceNames correctly populates the drop down list based on user permissions to the points. However, if there is no default parameter saved for the W/L or the user does not have permission to the points which the default parameter queries then the dropdown list returns empty list and does not get populated with the deviceNames to which the user has access which is frustrating . How does one make the watchlist parameter dropdown show only device names based on user point permissions?

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

        Hi Phillip,

        Thanks for bringing this to our attention. I'm not sure I saw exactly what you're describing. In my tests, if a user had read permission to a point (not from set permission and not from data source permission, but actual read permission) then the device name was appearing in the parameter dropdown of device names. Otherwise, it was not, and the default setting didn't seem to affect anything. I have created this issue about it: https://github.com/infiniteautomation/ma-core-public/issues/1272

        1 Reply Last reply Reply Quote 0
        • P
          Phillip Weeks
          last edited by Phillip Weeks

          We have a watchlist with a parameter variable selectedDevice representing a deviceName list selection and it is set to a default value of "device-102". If user102 has read point permissions to points for devices-101 and devices-102 then the watchlist parameter dropdown will contain deviceNames 101 and 102 only. However if user101 loads the same watchlist and has access to only points on device-101 but not device 102 which is the default device for the watchlist then nothing gets loaded into the dropdown where one would like it to populate with device-101. If there is no default deviceName saved for the watchlist parameter then neither user101 nor user102 will have values populated in the dropdown.

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

            I see how that could happen. The SQL keyword DISTINCT is in the select in that REST controller, so it's only checking the readPermission of the first point with a given deviceName from the dataPoints table. I have corrected this.

            1 Reply Last reply Reply Quote 0
            • P
              Phillip Weeks
              last edited by Phillip Weeks

              Thank-you, that's awesome Phil , When is the next release date?

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

                I went ahead and released an updated API module just now, that's all that changed. Give it a whirl!

                1 Reply Last reply Reply Quote 0
                • P
                  Phillip Weeks
                  last edited by Phillip Weeks

                  ok I updated but it did not correct the issue ..When user201 logs in the dropdown is empty because the watchlist default parameter is set to unit202 and user201 does not have permission to unit202 points so the dropdown is empty and no points are selected.
                  If I clear the parameter and save the watchlist even superadmin gets an empty dropdown list. I used 101 and 102 above but its same situation with 201 and 202. User201 has access to Unit201 points and User202 has access to Unit202 & Unit201. He sees a list because the default device202 has points he has permission to and user201 does not.

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

                    Do you have any errors in your developer tools or in your log output when the list fails to present options?

                    I am certain that I have tested the situation you're describing, and am not seeing the issue. Perhaps you can email my a zip of your database?

                    1 Reply Last reply Reply Quote 0
                    • P
                      Phillip Weeks
                      last edited by Phillip Weeks

                      Doing it now Phil. might be a bit 2 big. 200m zipped
                      or I can send you long in details to see it yourself.

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

                        How about just one of the SQL backups?

                        1 Reply Last reply Reply Quote 0
                        • P
                          Phillip Weeks
                          last edited by

                          The file was too massive to email so sent you login info

                          1 Reply Last reply Reply Quote 0
                          • P
                            Phillip Weeks
                            last edited by

                            Thank you again Phil for the help and I am happy to report all is working perfectly. I removed the default parameter and set the watchlist parameter variable to the user's default device permission using a nested in-line if statement in the <watchlist ng-init . Works perfect :>)

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

                              Nice! Thanks for sharing how you got it initializing to a good value!

                              We noticed that after I fixed the rest controller as noted in this thread, that the drop down did have the entries we desired by that the carrot to expand the watchlist wasn't clickable even though there were entries in the select. We clicked the select itself and it populated appropriately.

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