/// <summary> /// Transforms a data masking policy to its cmdlet model representation /// </summary> private DatabaseDataMaskingPolicyModel ModelizeDatabaseDataMaskingPolicy(DataMaskingPolicy policy) { DatabaseDataMaskingPolicyModel dbPolicyModel = new DatabaseDataMaskingPolicyModel(); DataMaskingPolicyProperties properties = policy.Properties; dbPolicyModel.DataMaskingState = ModelizePolicyState(properties.DataMaskingState); dbPolicyModel.PrivilegedUsers = properties.ExemptPrincipals; return dbPolicyModel; }
/// <summary> /// Transforms a data masking policy to its cmdlet model representation /// </summary> private DatabaseDataMaskingPolicyModel ModelizeDatabaseDataMaskingPolicy(DataMaskingPolicy policy) { DatabaseDataMaskingPolicyModel dbPolicyModel = new DatabaseDataMaskingPolicyModel(); DataMaskingPolicyProperties properties = policy.Properties; dbPolicyModel.DataMaskingState = (properties.DataMaskingState == SecurityConstants.DataMaskingEndpoint.Enabled) ? DataMaskingStateType.Enabled : DataMaskingStateType.Disabled; dbPolicyModel.MaskingLevel = (properties.MaskingLevel == SecurityConstants.DataMaskingEndpoint.Standard) ? MaskingLevelType.Standard : MaskingLevelType.Extended; dbPolicyModel.PrivilegedLogins = properties.ExemptPrincipals; return dbPolicyModel; }