mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CS-16585: cloudstack 3.0 API - listProjects API - throw an API error if account is specified but domain is not.
This commit is contained in:
parent
6358acff54
commit
ce60cfee85
@ -382,6 +382,12 @@ public class ProjectManagerImpl implements ProjectManager, Manager{
|
||||
accountId = owner.getId();
|
||||
}
|
||||
}
|
||||
else { //domainId == null
|
||||
if (accountName != null) {
|
||||
throw new InvalidParameterValueException("could not find account " + accountName + " because domain is not specified", null);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
if (accountName != null && !accountName.equals(caller.getAccountName())) {
|
||||
throw new PermissionDeniedException("Can't list account " + accountName + " projects; unauthorized");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user