There are two ways of referencing user rights:
- Directly in the data of CpStudio, e.g. at manual functions
- In the View designer at the Authorization properties
It is easy to find the usages of the first kind:
- In CpStudio, open View --> Data by category --> User management
- Select the right
- Press F11
- If nothing happens, the right is not referenced anywhere.
- If it is referenced in exactly one place, CpStudio will navigate there directly.
- If there is more than one usage, a dialog will pop up showing all usages
The usages in the HMI views cannot be found that easily, but it should work this way:
- Search all sfc files in the subfolders of Station\Hmi\SmartForms for Right="EditData104" (e.g. using notepad++, Find in files...)
- Unfortunately, it is not easy to find out which object the views belong to (unless the view name gives you a hint), because the containing folder does not have a readable name but a GUID instead. But you can find out what object the GUID corresponds with.
- Open the file Station\Hmi\config.xml with a text editor and look for the folder name (the GUID). You should find a line starting with <Unit having the XML attribute sfcPath="SmartForms\<YourFolderNameGuid>". The same line also tells you the name of the object.
- Now you should be able to identify and open the view in CpStudio.
- Finding the control that the right is assigned to: Some lines above the place where you found the right in the sfc file, there is a node like <Mod_Button wfml:ID="Mod_Button1". Mod_Button1 is the name of the button.
- On top of the Smart Properties in CpStudio, there is a dropdown list where you can find and select all the controls by their name.
Besides, I have one small hint: I would recommend to use separate rights for different use-cases. The EditData rights are meant for the data editor. Of course, it works to use the same rights somewhere else. But if you create your own rights for project-specific use-cases, you have the chance to give them a meaningful name and text, telling the user admin what features he is actually enabling by granting a right.