Plugin authorization Sample or Documentation

Dear Support,

I need to apply authorisation to my plugin.

In the Management Client, I need to set access for certain milestone Roles, and In the Smart Client, the Plugin must be available based on these Role Selections made in the Management Client.

I cannot seem to Find a Sample or detailed information in the Mips Documentation, help Please?

I wonder if you can extract the knowledge from this forum topic? (old forum, which incidently is a gold mine of information) -

http://forum.milestonesys.com/yaf_postst9850_Get-Plugin-current-User-roles.aspx