public class PageUtilPlugin : UserControlBase, ICustomPlugInLoader
and implement the ICustomPlugInLoader.List method:
public PlugInDescriptor[] List()
{
PlugInDescriptor[] aDescriptors = null;
// Check if we should show the plugin
if (PageBase.CurrentUser.IsInRole("Administrators") != false)
{
aDescriptors = new PlugInDescriptor[1];
aDescriptors[0] = PlugInDescriptor.Load(this.GetType());
}
// else return null
return aDescriptors;
}
The effect, this plugin will only be shown to users in the Administrators group.