Example #1
0
 protected override void ValidateUnacceptableParameter()
 {
     if (this.Identity != null && !DevicePolicyUtility.IsDeviceTenantRule(this.Identity.ToString()))
     {
         base.WriteError(new ArgumentException(Strings.CanOnlyManipulateDeviceTenantRule), ErrorCategory.InvalidArgument, null);
     }
     if (DevicePolicyUtility.IsPropertySpecified(base.DynamicParametersInstance, ADObjectSchema.Name))
     {
         base.WriteError(new ArgumentException(Strings.CannotChangeDeviceTenantRuleName), ErrorCategory.InvalidArgument, null);
     }
 }
Example #2
0
 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.IsDeviceTenantRule(identity));
 }
        internal static bool IsDeviceTenantRule(string identity)
        {
            Guid ruleGuid;

            return(Guid.TryParse(identity.Substring((identity.LastIndexOf('{') == -1) ? 0 : identity.LastIndexOf('{')), out ruleGuid) && DevicePolicyUtility.IsDeviceTenantRule(ruleGuid));
        }