public bool HasPermission() { List <string> list = new List <string>(this.additionalParameters); list.AddRange(this.parameters.Keys); return(EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope(this.CommandText, list.ToArray())); }
public static bool IsCmdletAllowedInScope(string commandText, string parameter) { return(EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope(commandText, new string[] { parameter })); }
public override bool HasPermission(string propertyName, IList <ParameterProfile> parameters) { ICollection <string> parameterList = EMCRunspaceConfigurationSingleton.GetInstance().GetAllowedParamsForSetCmdlet(this.commandText, null); return(parameterList != null && parameterList.Contains(propertyName, new CaseInSensitveComparer()) && (from c in parameters where parameterList.Contains(c.Name, new CaseInSensitveComparer()) select c).Count <ParameterProfile>() == parameters.Count && (this.IgnoreIdentityParameter || parameterList.Contains("Identity", new CaseInSensitveComparer()))); }
public override bool HasPermission(string propertyName, IList <ParameterProfile> parameters) { return(EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope(this.CommandText, new string[] { propertyName, "Identity" })); }
internal string GetEcpUrl(EcpUrlKey key) { if (this.EcpRootUrl == null) { return(null); } if (PSConnectionInfoSingleton.GetInstance().Type == OrganizationType.Cloud && !string.IsNullOrEmpty(EMCRunspaceConfigurationSingleton.GetInstance().TenantDomain)) { return(string.Concat(new string[] { this.EcpRootUrl, "/?Realm=", EMCRunspaceConfigurationSingleton.GetInstance().TenantDomain, "&ftr=", key.ToString() })); } return(this.EcpRootUrl + "/?ftr=" + key.ToString()); }
public bool HasPermission() { bool flag = false; if (this.FillType == null) { using (List <AbstractDataTableFiller> .Enumerator enumerator = this.tableFillers.GetEnumerator()) { while (enumerator.MoveNext()) { AbstractDataTableFiller abstractDataTableFiller = enumerator.Current; MonadAdapterFiller monadAdapterFiller = abstractDataTableFiller as MonadAdapterFiller; if (monadAdapterFiller == null || monadAdapterFiller.HasPermission()) { flag = true; break; } } goto IL_9B; } } flag = true; foreach (AbstractDataTableFiller abstractDataTableFiller2 in this.tableFillers) { MonadAdapterFiller monadAdapterFiller2 = abstractDataTableFiller2 as MonadAdapterFiller; if (monadAdapterFiller2 != null && !monadAdapterFiller2.HasPermission()) { flag = false; break; } } IL_9B: if (string.Equals(this.Name, "MailboxMigration", StringComparison.OrdinalIgnoreCase)) { flag = (EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope("Get-MoveRequest", new string[] { "Identity", "ResultSize" }) && EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope("Get-MoveRequestStatistics", new string[] { "Identity" })); } else if (string.Equals(this.Name, "Database", StringComparison.OrdinalIgnoreCase)) { flag = ((EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope("Get-MailboxDatabase", new string[] { "Identity" }) && EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope("Get-MailboxDatabaseCopyStatus", new string[] { "Identity", "Server" })) || EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope("Get-PublicFolderDatabase", new string[] { "Identity", "Status" })); } else if (flag && string.Equals(this.Name, "DisconnectedMailbox", StringComparison.OrdinalIgnoreCase)) { flag = EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope("Get-ExchangeServer", new string[] { "Identity" }); } return(flag); }
public override bool HasPermission(IList <ParameterProfile> paramInfos) { return(EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope(this.commandText, (from c in paramInfos select c.Name).ToArray <string>())); }
public override bool HasPermission() { return(EMCRunspaceConfigurationSingleton.GetInstance().IsCmdletAllowedInScope(this.CommandText, (from MonadParameter c in this.Parameters select c.ParameterName).ToArray <string>())); }