Or, even better, Component Security?
https://docs.inductiveautomation.com/display/DOC81/Component+and+Window+Security