예제 #1
0
 internal static void InsertClaimTransformRule(ADParameterSet parameters, CmdletSessionInfo cmdletSessionInfo)
 {
     if (parameters.GetSwitchParameterBooleanValue("DenyAll"))
     {
         parameters["Rule"] = ADCBACUtil.CreateClaimTransformDenyRule(null);
     }
     if (!parameters.GetSwitchParameterBooleanValue("AllowAll"))
     {
         if (!parameters.Contains("AllowAllExcept") || parameters["AllowAllExcept"] == null)
         {
             if (parameters.Contains("DenyAllExcept") && parameters["DenyAllExcept"] != null)
             {
                 string[] claimTypeName = ADCBACUtil.GetClaimTypeName((ADClaimType[])parameters["DenyAllExcept"], cmdletSessionInfo, "DenyAllExcept");
                 parameters["Rule"] = ADCBACUtil.CreateClaimTransformDenyRule(claimTypeName);
             }
             return;
         }
         else
         {
             string[] strArrays = ADCBACUtil.GetClaimTypeName((ADClaimType[])parameters["AllowAllExcept"], cmdletSessionInfo, "AllowAllExcept");
             parameters["Rule"] = ADCBACUtil.CreateClaimTransformAllowRule(strArrays);
             return;
         }
     }
     else
     {
         parameters["Rule"] = ADCBACUtil.CreateClaimTransformAllowRule(null);
         return;
     }
 }
예제 #2
0
 internal override string GenerateObjectName(ADParameterSet parameters)
 {
     if (parameters.Contains("ID"))
     {
         ADCBACUtil.ValidateClaimID(parameters["ID"] as string);
         return(parameters["ID"] as string);
     }
     else
     {
         return(ADCBACUtil.GenerateClaimID(parameters["DisplayName"] as string));
     }
 }
예제 #3
0
 private bool ADGroupPreCommitFSRoutine(ADFactory <T> .DirectoryOperation operation, T instance, ADParameterSet parameters, ADObject directoryObj)
 {
     if (operation != ADFactory <T> .DirectoryOperation.Create || instance != null || parameters.Contains("GroupCategory"))
     {
         return(false);
     }
     else
     {
         directoryObj["groupType"].Value = (int)directoryObj["groupType"].Value | -2147483648;
         return(true);
     }
 }