For Management Client, it is shown under Management Client Profile in profile settings but for couldn’t do the same for Smart Client profile.
Trying it out I think you are right, where the Management Client profiles makes it easy to remove a plugin from sight there is no equivalent in the Smart Client profiles.
I have a solution but it does not incorporate Smart Client profiles but “SecurityActions”.
I made plugin which includes a tab (workspace) which should be visible for users depending on their membership of a role.
For the plugins security actions I have (PluginDefinition):
private List<SecurityAction> _securityActions = new List<SecurityAction>
{
new SecurityAction("GENERIC_WRITE", "Manage"),
new SecurityAction("GENERIC_READ", "Read"),
};
For the Init method of the plugin I added:
if (EnvironmentManager.Instance.EnvironmentType == EnvironmentType.SmartClient)
{
if(IsWSAllow())
{
_workSpacePlugins.Add(new PluginSecureWorkSpacePlugin());
}
else
{
_workSpacePlugins.Clear();
}
-and-
public bool IsWSAllow()
{
try
{
VideoOS.Platform.Util.SecurityAccess.CheckPermission(PluginSecureDefinition.PluginSecurePluginId, "GENERIC_READ");
}
catch (NotAuthorizedMIPException)
{
return false;
}
catch (Exception ex)
{
System.Windows.MessageBox.Show(ex.ToString());
return false;
}
return true;
}
After deploying the plugin I see in the Management Client
and depending on whether the Read is set for the Role, the users belonging to that Role will see the workspace or not.Thank you for that, will try it.
