I am hoping to use,
if any(role.startswith(security_prefix) for role in system.security.getRoles()):
in a onStartup script but I just get the error,
AttributeError: 'com.inductiveautomation.ignition.common.script.Imm' object has no attribute 'getRoles'
Not sure why, all the examples I see of this being used are in event scripts - where am I supposed to be able to use this?