UserMgrGroupAdd (FUN) ¶ FUNCTION UserMgrGroupAdd : RTS_IEC_RESULT Add a group to user group database InOut: Scope Name Type Comment Return UserMgrGroupAdd RTS_IEC_RESULT Error code ERR_OK: Group could be added ERR_NOMEMORY: No memory to add group ERR_DUPLICATE: pszGroupName is already added. ERR_FAILED: Creating user or group lists failed ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user Inout Const pszGroupName STRING Name of the group
UserMgrGroupAddUser (FUN) ¶ FUNCTION UserMgrGroupAddUser : RTS_IEC_RESULT Add a user to a group in the user group database InOut: Scope Name Type Comment Return UserMgrGroupAddUser RTS_IEC_RESULT Error code ERR_OK: User could be added ERR_NOMEMORY: No memory to add user to group ERR_DUPLICATE: pszUserName is already added. ERR_NO_OBJECT: Group name does not exist ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user Inout Const pszGroupName STRING Name of the group pszUserName STRING Name of the user
UserMgrGroupGetFirst (FUN) ¶ FUNCTION UserMgrGroupGetFirst : RTS_IEC_HANDLE Iteration interface to get the first user group InOut: Scope Name Type Comment Return UserMgrGroupGetFirst RTS_IEC_HANDLE Handle to the first user group or RTS_INVALID_HANDLE if failed Input hUser RTS_IEC_HANDLE Handle to authorized user Output Result RTS_IEC_RESULT Error code ERR_OK: First user group available ERR_NO_OBJECT: No user group configured ERR_NO_ACCESS_RIGHTS: User not authorized
UserMgrGroupGetFirstUser (FUN) ¶ FUNCTION UserMgrGroupGetFirstUser : RTS_IEC_RESULT Iteration interface to get the first user of the user group InOut: Scope Name Type Comment Return UserMgrGroupGetFirstUser RTS_IEC_RESULT Error code ERR_OK: First user in the group available ERR_NO_OBJECT: No user configured in the user group ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user hGroup RTS_IEC_HANDLE Group handle Inout phIterator RTS_IEC_HANDLE Iteration handle to use with UserMgrGroupGetNextUser() pszUsername STRING(59) Buffer to store the name, 59 chars max
UserMgrGroupGetHandle (FUN) ¶ FUNCTION UserMgrGroupGetHandle : RTS_IEC_HANDLE Retrieve the handle from the given group name InOut: Scope Name Type Comment Return UserMgrGroupGetHandle RTS_IEC_HANDLE Correspondig group handle or RTS_INVALID_HANDLE if failed Input hUser RTS_IEC_HANDLE Handle to authorized user Inout Const pszGroupName STRING Name of the group Output Result RTS_IEC_RESULT Error code ERR_OK: Group handle could be retrieved ERR_NO_OBJECT: Group was not found ERR_NO_ACCESS_RIGHTS: User not authorized
UserMgrObjectAdd (FUN) ¶ FUNCTION UserMgrObjectAdd : RTS_IEC_HANDLE Adds a new object to the user management, so the access rights can be configured on that object. Limited to the application subtree. Note The name of the object must include the full name-space with “Device” as the root node, e.g. “Device.PlcLogic.Application.MyObject”. InOut: Scope Name Type Comment Return UserMgrObjectAdd RTS_IEC_HANDLE Handle to the object or RTS_INVALID_HANDLE if it could not be added Input pszObject REFERENCE TO STRING Full object name (see object tree) pResult POINTER TO RTS_IEC_RESULT Pointer to error code ERR_OK: Object could be added ERR_PARAMETER: Object invalid = NULL or empty ERR_NOTINITIALIZED: The user management is not initialized or it is not loaded yet ERR_NOMEMORY: If memory could not be allocated to store this object ERR_NO_ACCESS_RIGHTS: No access rights in IEC context
UserMgrObjectAddGroup (FUN) ¶ FUNCTION UserMgrObjectAddGroup : RTS_IEC_RESULT Add a group to the specified object to manage access rights InOut: Scope Name Type Comment Return UserMgrObjectAddGroup RTS_IEC_RESULT Error code ERR_OK: Group could be added or is already added ERR_PARAMETER: Invalid handles ERR_NOMEMORY: No memory to add group ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user hObject RTS_IEC_HANDLE Handle to the object hGroup RTS_IEC_HANDLE Handle to the group that should be attached
UserMgrObjectClearRights (FUN) ¶ FUNCTION UserMgrObjectClearRights : RTS_IEC_RESULT This function clears all granted and denied rights for all groups on that object. InOut: Scope Name Type Comment Return UserMgrObjectClearRights RTS_IEC_RESULT Error code ERR_OK: Access rights could be cleared ERR_PARAMETER: Invalid handles ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user hObject RTS_IEC_HANDLE Handle to the object
UserMgrObjectGetFirstChild (FUN) ¶ FUNCTION UserMgrObjectGetFirstChild : RTS_IEC_HANDLE Iteration interface to get the first child object in the object tree of the specified father object Limited to the application subtree. InOut: Scope Name Type Comment Return UserMgrObjectGetFirstChild RTS_IEC_HANDLE Handle to the child object or RTS_INVALID_HANDLE if failed Input hFatherObject RTS_IEC_HANDLE Handle to the father object Output Result RTS_IEC_RESULT Error code ERR_OK: First child object available ERR_PARAMETER: Invalid parameter hFatherObject ERR_NOTINITIALIZED: The user management is not initialized or it is not loaded yet ERR_NO_ACCESS_RIGHTS: No access rights in IEC context
UserMgrObjectGetFirstGroup (FUN) ¶ FUNCTION UserMgrObjectGetFirstGroup : RTS_IEC_HANDLE Iteration interface to get the first group in the user rights management of the specified object InOut: Scope Name Type Comment Return UserMgrObjectGetFirstGroup RTS_IEC_HANDLE Handle to the first group of the object in the user rights management or RTS_INVALID_HANDLE if failed Input hUser RTS_IEC_HANDLE Handle to authorized user hObject RTS_IEC_HANDLE Handle to the object Output Result RTS_IEC_RESULT Error code ERR_OK: Next group available ERR_PARAMETER: Invalid handles ERR_NO_OBJECT: No next group available ERR_NO_ACCESS_RIGHTS: User not authorized