Checking user permissions with PI-SDK code

Discussion created by bsquassoni on Jul 19, 2011
Latest reply on Feb 8, 2012 by Ahmad Fattahi

I have an Excel spreadsheet that is used to generate text files with Manual Data (lab values) to be sent to the PI Server (a PI HA with 2 PI Servers) from a PI UFL Interface. This spreadsheet is used by many users.





The PI UFL Interface will send to PI Server (HA) any value it reads from the text files. I don't want userA creating a text file with tags from userB's site. Then before creating the text file, I need to check if userA has write permissions on the tags he is sending to the text file.





So I need to ensure that the user, using the spreadsheet to generate lab values, has writting permissions to the tags that are being used to generate the text file. I don't want the user to create a text file with tags and values that he was not access to read/write, because I cannot avoid the UFL interface from writing to the PI Server just to some tags





Is there any example code I could use in the spreadsheet so that an user only can generate the text file with tags to which he has write permissions?