Hi Team,
What is the best practice to open up different page when user login with supervisor logon. Same with menu bar or navigation bar.
Where should it be scripted on client scripts or any other way it can be achieved.
Is there document which highlight example scripts for this functionality.
You're talking about navigating to a different starting window based on privilege level?
A common approach is to not have any window set to open on startup. Then, in the client startup script, examine the user roles and branch to an appropriate scripted window open call. This approach can also be used to open specific windows based on machine identity (MAC address is my preference).
4 Likes
Is it recommended to make a separate project for each separate Vision client/HMI?
Do separate projects burden the Gateway more than using a client startup script to open specific windows for Vision?
I think it must be discussed at length somewhere, but I am not finding the topic(s) when I search.
I don't recommend it. I prefer to put all client-machine-specific possibilities in a single project so the client startup event can ask a database which window that client should start up with.
zacharyw.larson:
burden the Gateway more
Probably a wash. I would expect separate projects to be much more trouble to maintain, unless you used inheritance for nearly everything.
1 Like
Thanks
Thanks for this post too:
Mobile Client MAC Address - #9 by jlivingston ]
I didn't understand it at first, but now that I used it, thanks so much.
# Call the function and print the MAC addresses
mac_addresses = myMacIds()
for mac in mac_addresses:
print(mac)
I used this to print the addresses, but I could instead match and then open the window if I understand correctly. Thanks.
1 Like
@pturmel Am I wasting my time learning how to do things in Vision for my HMI?
Can I check the MAC address in Perspective?
Or another way to restrict access to specific hardware in Perspective?
This is the among the things that Perspective cannot do.
See this somewhat recent topic:
What if you need to reliably lock down a particular operation to a client on a single computer? Behind a NAT? Perspective can't do it. Vision can. Vision can even probe its environment for things like motherboard serial numbers, if you have that need.
What if you need to reliably handle a barcode scanner or RFID reader, or similar device, no matter what page the client is looking at? Perspective can't do it. Vision can.
What if you need to use a physical security token with certificate …
1 Like
Thanks Pturmel,
Is there any example code which i can look into how the privilege level to open up the window.
Here is a thread on that topic:
I wonder if it’s possible to check if a user is allowed to open a window before opening it.
Like that, we could disable or even hide buttons that would other wise navigate to an inaccessible screen, without having to give the user that annoying error popup.
Just defining the rights twice is no option, as our navigation bar is multi-layered, so the same button can open different screens depending on what section is selected in the layer above.