server: fix vm can be recovered by other accounts (#5822)

This commit is contained in:
Wei Zhou 2022-01-07 08:43:48 +01:00 committed by GitHub
parent 3cbde8cd6c
commit 6d35b520d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,8 @@ package org.apache.cloudstack.api.command.admin.vm;
import org.apache.log4j.Logger;
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
import org.apache.cloudstack.api.ACL;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@ -43,6 +45,7 @@ public class RecoverVMCmd extends BaseCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@ACL(accessType = AccessType.OperateEntry)
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine")
private Long id;