mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Don't default resource owner to System account when command is executed via 8096 and account or domainId are missing
This commit is contained in:
parent
0e819fcabc
commit
668fde991c
@ -1500,6 +1500,11 @@ public class AccountManagerImpl implements AccountManager, AccountService, Manag
|
||||
}
|
||||
|
||||
public Account finalizeOwner(Account caller, String accountName, Long domainId) {
|
||||
//don't default the owner to the system account
|
||||
if (caller.getId() == Account.ACCOUNT_ID_SYSTEM && (accountName == null || domainId == null)) {
|
||||
throw new InvalidParameterValueException("Account and domainId are needed for resource creation");
|
||||
}
|
||||
|
||||
if (isAdmin(caller.getType()) && accountName != null && domainId != null) {
|
||||
DomainVO domain = _domainDao.findById(domainId);
|
||||
if (domain == null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user