internal override bool?IsInRoleCmdlet(ExchangeRunspaceConfiguration rbacConfiguration) { RbacQuery rbacQuery = new RbacQuery("Get-SupervisionPolicy"); if (!rbacQuery.IsInRole(rbacConfiguration)) { return(new bool?(false)); } Supervision supervision = new Supervision(); PowerShellResults <SupervisionStatus> @object = supervision.GetObject(null); if (@object.SucceededWithValue) { foreach (SupervisionStatus supervisionStatus in @object.Output) { if (supervisionStatus.ClosedCampusPolicyEnabled) { return(new bool?(true)); } } return(new bool?(false)); } base.LogCmdletError(@object, "ClosedCampus"); return(null); }
internal override bool?IsInRoleCmdlet(ExchangeRunspaceConfiguration rbacConfiguration) { RbacQuery rbacQuery = new RbacQuery("Get-CasMailbox"); if (!rbacQuery.IsInRole(rbacConfiguration)) { return(new bool?(true)); } return(new bool?(!rbacConfiguration.ExecutingUserIsPopEnabled && !rbacConfiguration.ExecutingUserIsImapEnabled)); }
internal static void RegisterQueryProcessors() { OrganizationCacheQueryProcessor <bool> .XPremiseEnt.Register(); OrganizationCacheQueryProcessor <bool> .XPremiseDC.Register(); RbacQuery.RegisterQueryProcessor("ClosedCampus", new ClosedCampusQueryProcessor()); RbacQuery.RegisterQueryProcessor("OrgHasManagedDomains", new AcceptedManagedDomainsQueryProcessor()); RbacQuery.RegisterQueryProcessor("OrgHasFederatedDomains", new AcceptedFederatedDomainsQueryProcessor()); RbacQuery.RegisterQueryProcessor("SendAddressAvailable", new SendAddressAvailableQueryProcessor()); RbacQuery.RegisterQueryProcessor("PopImapDisabled", new PopImapDisabledQueryProcessor()); RbacQuery.RegisterQueryProcessor("IPSafelistingEhfSyncEnabledRole", new IPSafelistingEhfSyncEnabledQueryProcessor()); RbacQuery.RegisterQueryProcessor("IPSafelistingSmpEnabledRole", new IPSafelistingSmpEnabledQueryProcessor()); RbacQuery.RegisterQueryProcessor("EhfAdminCenterEnabledRole", new EhfAdminCenterEnabledQueryProcessor()); RbacQuery.RegisterQueryProcessor("BusinessLiveId", LiveIdInstanceQueryProcessor.BusinessLiveId); RbacQuery.RegisterQueryProcessor("ConsumerLiveId", LiveIdInstanceQueryProcessor.ConsumerLiveId); RbacQuery.RegisterQueryProcessor("IsDehydrated", new IsDehydratedQueryProcessor()); RbacQuery.RegisterQueryProcessor("SoftDeletedFeatureEnabled", new SoftDeletedFeatureStatusQueryProcessor()); RbacQuery.RegisterQueryProcessor("OfficeStoreAvailable", new OfficeStoreAvailableQueryProcessor()); foreach (EcpFeature ecpFeature in ClientRbac.HybridEcpFeatures) { new EcpFeatureQueryProcessor(ecpFeature).Register(); } new AliasQueryProcessor("ControlPanelAdmin", "OrgMgmControlPanel+Admin").Register(); new AliasQueryProcessor("HybridAdmin", "ControlPanelAdmin+XPremiseEnt,ControlPanelAdmin+LiveID").Register(); RbacQuery.ConditionalQueryProcessors.Regist(delegate(string rbacQuery, out RbacQuery.RbacQueryProcessor processor) { if (EacFlightUtility.FeaturePrefixs.Any((string prefix) => rbacQuery.StartsWith(prefix))) { processor = new FlightQueryProcessor(rbacQuery); return(true); } processor = null; return(false); }); }