Isolating users to a dashboard with only their device points
-
now we are using the dropdown list and we will keep this as a separate dashboard for admins but for the regular users redirected to a specific dashboard we won't keep the dropdown so the parameter would also work...
Point hierarchy folder ID = "Unit " + {{user.username.substr(1,4)}}
OR
or(eq(deviceName,{{user.username.substr(1,4)}}),eq(deviceName,Outside%20Climate))&sort(deviceName,name)&limit(200)
-
Interesting, this is pretty much exactly what I would like to do, except that my device names/points aren't tied to a user, I would just like to be able to associate a user with a specific point and allow them to only see that one point.
Did you guys ever figure this out? Is there a way I can associate some tag with a user account which would allow me to display only the data which I want them to see?
-
@psysak said in Isolating users to a dashboard with only their device points:
I would just like to be able to associate a user with a specific point and allow them to only see that one point.
If you set the point permissions so they only have read access to that one point then that is the only point that will be returned in point queries for that user.
-
This may be of some interest as well. Like Jared mentioned, setting read permissions now will influence what a user can pull esp. in RQL queries.
I've gone as far as tagging all of my points. Setting a 'user' tag to match the same name as the usernames. That way when I pull a page of a certain system 'type' all data associated with that user is pulled as well. Am still working on making a linking system with users has n devices and each device has these points etc... -
@jared-wiltshire said in Isolating users to a dashboard with only their device points:
@psysak said in Isolating users to a dashboard with only their device points:
I would just like to be able to associate a user with a specific point and allow them to only see that one point.
If you set the point permissions so they only have read access to that one point then that is the only point that will be returned in point queries for that user.
Oh that's a nice and simple solution :)
@mattfox said in Isolating users to a dashboard with only their device points:
This may of some interest as well. Like Jared mentioned, setting read permissions now will influence what a user can pull esp. in RQL queries.
I've gone as far as tagging all of my points. Setting a 'user' tag to match the same name as the usernames. That way when I pull a page of a certain system 'type' all data associated with that user is pulled as well. Am still working on making a linking system with users has n devices and each device has these points etc...I was just goofing around with that myself but I seem to be too inept to figure out how then to query for that tag :(
-
in(tags.user,username)&limit(100)&sort(name)
OR
like(tags.user,*user*)&limit(100)&sort(name)
The RQL query watchlist builder is your friend here.
EDIT: Do note I created my own tags, and my own page to handle them. You'd have to use the bulk datapoint editor to set tags I believe.
-
I do agree that you should tag your data points as well as setting the permission on them. Will make it easier for you as an admin to distinguish between them.
@mattfox said in Isolating users to a dashboard with only their device points:
You'd have to use the bulk datapoint editor to set tags I believe.
Correct, or the CSV import, or JSON configuration import. There is a new Data Sources page coming in the next major UI release, so it will become easier!
-
@mattfox said in Isolating users to a dashboard with only their device points:
in(tags.user,username)&limit(100)&sort(name)
OR
like(tags.user,*user*)&limit(100)&sort(name)
The RQL query watchlist builder is your friend here.
EDIT: Do note I created my own tags, and my own page to handle them. You'd have to use the bulk datapoint editor to set tags I believe.
First of all that worked beautifully, thank you :)
I had a question about the username portion of the query. So I set a custom tag to my username, call it user1. If I run that query and actually just type user1 I get my point list. If however I try to pass something like {{user.current.username}} it never matches. I even have a block of code on my page which is just a span <span> Your username is {{user.current.username}} and that shows "user1". I'm missing something fundamental.
-
You'll likely need to do this:
<ma-point-query query="'in(tags.username,'+user.current.username+')&sort(deviceName)&limit(200)'" points="userPoints">/<ma-point-query>
-
Works like a charm, just user has to be User, picky little thing :)