Circling back on this topic–I wanted to share that there is a UIResponse object returned from
system.user.editUser() calls that can provide some extra messaging on the result of the call. This helped me discover that you cannot use these methods to alter the gateway system user source.
Here is the tail end of my testing script:
ui_response = system.user.editUser(user_source, user)
[logger.info(x) for x in ui_response.getInfos()]
[logger.warn(x) for x in ui_response.getWarns()]
[logger.error(x) for x in ui_response.getErrors()]
… which produced the following error when trying to apply this to a user in the
default user source (selected as the Gateway System user source by default):
13:45:31.116 [AWT-EventQueue-0] ERROR scheduling - You are not authorized to modify the Gateway system user source.
All of that said, the changes to scheduling (against a separate user source) with or without
isAvailable seem to be functioning correctly at this time. While I’m in here, I’ll mention that I did have to call the
updateTables() method against the Vision User Management component to have the changes I was doing via scripting reflect properly (or reload the window, thus refreshing the user/schedules implicitly).
Hope this helps!