09-12-2016 01:37 PM
Hi,
Is there a way to programmatically access Details and Comment fields from User Manager?
09-12-2016 02:26 PM
Hi bienieck,
I'm not sure about the Details field, but comments can be edited through the UsersFile.UserList object. For example, to edit the Comment field of the Operate.Execute privilege of the User administrator, you could use the expression:
RunState.Engine.UsersFile.UserList.GetPropertyObjectByOffset(0,0).AsUser.Privileges.Operate.Execute.Comment = "New Comment"
This will edit the actual Users.ini file with the new value.
I would think you could access the Details field similarly, but I've been unable to locate the property it is stored under. It's not an editable field in the User Manager, so it is possible it isn't directly editable. It appears to be directly linked to which Group(s) the User is a member of.
09-12-2016 03:14 PM
I'm acquiring Privileges refnum from TS.User (like Jigg suggests here)
and then I'm using PropertyObject.Comment to get Comment (see subVI below). But as you can see there is no Details PropertyObject... So is it stored somewhere or is it evaluated dynamically? If dynamically is there any method which returns this text?