protected override void ValidateUnacceptableParameter() { if (this.Identity != null && !DevicePolicyUtility.IsDeviceConfigurationRule(this.Identity.ToString())) { base.WriteError(new ArgumentException(Strings.CanOnlyManipulateDeviceConfigurationRule), ErrorCategory.InvalidArgument, null); } if (DevicePolicyUtility.IsPropertySpecified(base.DynamicParametersInstance, ADObjectSchema.Name)) { base.WriteError(new ArgumentException(Strings.CannotChangeDeviceConfigurationRuleName), ErrorCategory.InvalidArgument, null); } }
internal static bool IsDeviceConfigurationRule(string identity) { Guid ruleGuid; return(Guid.TryParse(identity.Substring((identity.LastIndexOf('{') == -1) ? 0 : identity.LastIndexOf('{')), out ruleGuid) && DevicePolicyUtility.IsDeviceConfigurationRule(ruleGuid)); }
protected override IEnumerable <RuleStorage> GetPagedData() { return(from p in base.GetPagedData() where p.Scenario == base.Scenario || (!AuditPolicyUtility.IsAuditConfigurationRule(p.Name) && !DevicePolicyUtility.IsDeviceConfigurationRule(p.Name) && !DevicePolicyUtility.IsDeviceConditionalAccessRule(p.Name) && !DevicePolicyUtility.IsDeviceTenantRule(p.Name) && p.Scenario != PolicyScenario.Dlp) select p); }
protected override bool IsDeviceRule(string identity) { return(DevicePolicyUtility.IsDeviceConfigurationRule(identity)); }