summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
diff options
context:
space:
mode:
authorjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-02-01 22:12:56 +0000
committerjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-02-01 22:12:56 +0000
commit028bbacd76b65369ad0f9437fc9dadbbd3b1a7ef (patch)
tree761722355edf897d25779c78aaa233bd1d40c54b /pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
parent1a3349426fd39450b0627858bbbc1a016a8a97e0 (diff)
downloadpki-028bbacd76b65369ad0f9437fc9dadbbd3b1a7ef.tar.gz
pki-028bbacd76b65369ad0f9437fc9dadbbd3b1a7ef.tar.xz
pki-028bbacd76b65369ad0f9437fc9dadbbd3b1a7ef.zip
Fix Bug 672920 - CA console: adding policy to a profile throws 'Duplicate policy' error in some cases.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1806 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java')
-rw-r--r--pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java b/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
index ec1a277fa..aac1bb3c0 100644
--- a/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
+++ b/pki/base/common/src/com/netscape/cms/profile/common/BasicProfile.java
@@ -810,7 +810,6 @@ public abstract class BasicProfile implements IProfile {
}
// Now make sure we aren't trying to add a policy that already exists
- // Make sure the combo of defaultClassId and constraintClassId does not exist
IConfigStore policySetStore = mConfig.getSubStore("policyset");
String setlist = null;
try {
@@ -858,14 +857,12 @@ public abstract class BasicProfile implements IProfile {
CMS.debug("WARNING, can't get constraint plugin id!");
}
- //Disallow duplicate defaults or constraints with the following exceptions:
- // noDefaultImpl, genericExtDefaultImpl, noDefaultConstraint
-
+ //Disallow duplicate defaults with the following exceptions:
+ // noDefaultImpl, genericExtDefaultImpl
+
if ((curDefaultClassId.equals(defaultClassId) &&
!curDefaultClassId.equals(PROP_NO_DEFAULT) &&
- !curDefaultClassId.equals(PROP_GENERIC_EXT_DEFAULT)) ||
- (curConstraintClassId.equals(constraintClassId) &&
- !curConstraintClassId.equals(PROP_NO_CONSTRAINT))) {
+ !curDefaultClassId.equals(PROP_GENERIC_EXT_DEFAULT)) ) {
matches++;
if (createConfig) {