Permissions and watchlist dropdown configuration
-
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. -
Thank-you, that's awesome Phil , When is the next release date?
-
I went ahead and released an updated API module just now, that's all that changed. Give it a whirl!
-
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. -
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?
-
Doing it now Phil. might be a bit 2 big. 200m zipped
or I can send you long in details to see it yourself. -
How about just one of the SQL backups?
-
The file was too massive to email so sent you login info
-
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 :>)
-
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.