UserMgrGetUserAccessRights (FUN) ¶ FUNCTION UserMgrGetUserAccessRights : RTS_IEC_RESULT Gets user access rights on the specified object (authorization)! InOut: Scope Name Type Comment Return UserMgrGetUserAccessRights RTS_IEC_RESULT Error code ERR_OK: If user has the requested rights on the object or if no user management is configured ERR_PARAMETER: If user is not available or the object does not exist ERR_FAILED: If something failed retrieving the access rights ERR_NO_ACCESS_RIGHTS: Explicitly denied rights ERR_INVALID_HANDLE: hUser is invalid or unknown Input pszObject REFERENCE TO STRING Full object name (see object tree) hUser RTS_IEC_HANDLE Handle to the user pulRights POINTER TO DWORD Pointer to get admitted rights pulDeniedRights POINTER TO DWORD Pointer to get denied rights. Note If the required right is denied _and_ admitted on the specified object, the denied right is more significant and so the access must be denied !!
UserMgrHasUserAccessRights (FUN) ¶ FUNCTION UserMgrHasUserAccessRights : RTS_IEC_RESULT Checks user access rights on the specified object (authorization)! InOut: Scope Name Type Comment Return UserMgrHasUserAccessRights RTS_IEC_RESULT Error code ERR_OK: If user has the requested rights on the object or if no user management is configured ERR_PARAMETER: If user is not available or the object does not exist ERR_FAILED: If something failed retrieving the access rights ERR_NO_ACCESS_RIGHTS: Explicitly denied rights ERR_INVALID_HANDLE: hUser is invalid or unknown Input pszObject REFERENCE TO STRING Full object name (see object tree) hUser RTS_IEC_HANDLE Handle to the user ulRequestedRights DWORD Requested rights on that object
Grouphandling ¶ UserMgrGroupAdd (Function) UserMgrGroupAddUser (Function) UserMgrGroupGetFirst (Function) UserMgrGroupGetFirstUser (Function) UserMgrGroupGetHandle (Function) UserMgrGroupGetName (Function) UserMgrGroupGetNext (Function) UserMgrGroupGetNextUser (Function) UserMgrGroupRemove (Function) UserMgrGroupRemoveUser (Function)
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
UserMgrGroupGetName (FUN) ¶ FUNCTION UserMgrGroupGetName : RTS_IEC_RESULT Get group name InOut: Scope Name Type Comment Return UserMgrGroupGetName RTS_IEC_RESULT Error code ERR_OK: Group name is returned ERR_PARAMETER: Invalid group handle ERR_BUFFERSIZE: The buffer was too small ERR_NO_ACCESS_RIGHTS: User not authorized Input hUser RTS_IEC_HANDLE Handle to authorized user hGroup RTS_IEC_HANDLE Handle to the group Inout pszGroup STRING(59) Buffer to store the name, 59 chars max
UserMgrGroupGetNext (FUN) ¶ FUNCTION UserMgrGroupGetNext : RTS_IEC_HANDLE Iteration interface to get next user group. Must be started with UserMgrGroupGetFirst() InOut: Scope Name Type Comment Return UserMgrGroupGetNext RTS_IEC_HANDLE Handle to the next user group or RTS_INVALID_HANDLE if failed Input hUser RTS_IEC_HANDLE Handle to authorized user hPrevGroup RTS_IEC_HANDLE Handle to the previous user group retrieved via UserMgrGroupGetFirst() or subsequent calls of UserMgrGroupGetNext() Output Result RTS_IEC_RESULT Error code ERR_OK: Next user group available ERR_NO_OBJECT: No next user group available ERR_NO_ACCESS_RIGHTS: User not authorized