int GetUserRight(int type);
GetUserRight is a function used to get the current user's rights as follows.
Function Arguments
type - The type of right to be checked.
0 : Program exit right
1 : Tag attribute modification right
Return Value
If the current user has the given type of right, the return value is 1. If not, the return value is 0.
Note
Each right can be set in the monitoring program's menu 'Settings|User'. You can also use the function @GetUserRightControl to check the rights of each tag.
Example1
r = @GetUserRight(0);
Description : Assigns the program exit (0) right of the current user to r. If the value of r is 1, the user has the right; if it is 0, the user does not have the right.
r = @GetUserRight(1);
Description : Assigns the tag attribute modification (1) right of the current user to r. If the value of r is 1, the user has the right; if it is 0, the user does not have the right.
Related Helps