How to hide/show some segments of WebSegmentedControl by user's privilege?

I want to show all segs or hide some segs of WebSegmentedControl by logon user’s privilege, Is there a convenient and fast way to do this.

Thaks a lot.

You can’t just hide/show individual segments. You can adjust the number of segments and the text of each one, so basically rebuild the entire thing as needed (including the logic that determines what to do when a segment is selected).