Skip to content

Commit 0ecdaeb

Browse files
committed
#4230 #4215 Reset account settings which visible under domain settings
1 parent fed99e9 commit 0ecdaeb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,8 +885,11 @@ public Pair<Configuration, String> resetConfiguration(final ResetCfgCmd cmd) thr
885885
throw new InvalidParameterValueException("cannot handle multiple IDs, provide only one ID corresponding to the scope");
886886
}
887887

888-
if (scope != null && !scope.equals(ConfigKey.Scope.Global.toString()) && !configScope.contains(scope)) {
889-
throw new InvalidParameterValueException("Invalid scope id provided for the parameter " + name);
888+
if (scope != null && !scope.equals(ConfigKey.Scope.Global.toString()) && !configScope.equals(scope)) {
889+
if (EnableAccountSettingsForDomain.value() &&
890+
!(configScope.equals(ConfigKey.Scope.Account.toString()) && scope.equals(ConfigKey.Scope.Domain.toString()))) {
891+
throw new InvalidParameterValueException("Invalid scope id provided for the parameter " + name);
892+
}
890893
}
891894

892895
String newValue = null;

0 commit comments

Comments
 (0)