Object Roles

I am wondering if there is a way to check and see what security roles an object has? For example if I have a button with three roles selected is there a way to see those roles except for the security tab in the designer?

I am trying to pass some security roles to other objects depending on what button is pressed.

The only scripting functions we have that might have what you’re looking for can be found in system.security. system.security.getRoles() is the closest thing we have, which gets all the roles of the current user that’s logged in.