Securing GUI Plugins

Vote:
 

Is it possible to lock down a GUI Plugin so that only specific users or roles can access it?

This is beyond the functionality provided by the RequiredAccess property of the GuiPlugIn attribute.

#49110
Mar 04, 2011 13:09
Vote:
 

Hi Greg!

You can implement the ICustomPluginLoader interface on your plugin and in its implementaiton perform the needed checks
and return an empty array of PlugInDescriptor if your security checks doesnt validate, something like this:

    [GuiPlugIn( ... )]
    public partial class MyGuiPlugin : UserControlBase, ICustomPlugInLoader
    {
        public PlugInDescriptor[]  List()
        {
            if(!PrincipalInfo.HasAdminAccess)
            {
                return new PlugInDescriptor[0];
            }

            return new PlugInDescriptor[1]{ PlugInDescriptor.Load(typeof(MyGuiPlugin)) };
        }

        ...
    }

    

/johan

#49111
Mar 04, 2011 13:26
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.