hook_<libraryPrefix>_hasUserAuthorization()

This function determines whether a certain user has the authorization to change the value of a data point element.

Synopsis

int hook_<libraryPrefix>_hasUserAuthorization(string sDpe, string sUserName);

Parameters

Parameters

Parameter Description
sDpe Name of the datapoint element for which the authorization is checked.
sUserName Name of the user whose authorization is checked.

Return Value

0 = User has no authorization.

1 = User has authorization.

< 0 = This function was not implemented. The default implementation is used (the authorization is validated via the datapoint config _auth or via the data point node name).

Description

This function determines whether a user has the authorization to change the value of data point elements. Note that this function must exist in every WinCC OA project that uses a library.

You can find the function in the stdlib_hook_project.ctl under wincc_oa_path/Stdlib_3.19/scripts/libs/

int hook_hasUserAuthorization(string sDpe, string sUserName)//attention, this function has to exist!
{
  //this function has to return :
  // 0 if user has no authorization
  // 1 if user has authorization
  // <0 if default implementation should be used (chech authorization form _auth config)
  return -9;
}