private bool HasPermission(IMenuItem menuItem) { bool hasPermission = false; if (menuItem.HasPluginAssigned) { var permissionHandler = new PermissionHandler(); hasPermission = permissionHandler.HasPermissionOnPlugin(menuItem.Plugin); } return(hasPermission); }
public List <IPlugin> GetPluginsAllowed() { var plugins = new List <IPlugin>(); var permissionHandler = new PermissionHandler(); foreach (IPlugin plugin in _plugins) { if (plugin.IsValid && permissionHandler.HasPermissionOnPlugin(plugin)) { plugins.Add(plugin); } } return(plugins); }
public List <IPluginSummary> GetPluginSummaryAllowed() { var plugins = new List <IPluginSummary>(); var permissionHandler = new PermissionHandler(); foreach (IPlugin plugin in _plugins) { if (permissionHandler.HasPermissionOnPlugin(plugin)) { plugins.Add(PluginSummary.CreateSummary(plugin)); } } return(plugins); }