mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Add access validation to Quota email APIs
This commit is contained in:
		
							parent
							
								
									64d83ce9d1
								
							
						
					
					
						commit
						c3c6d34589
					
				| @ -17,6 +17,7 @@ | |||||||
| package org.apache.cloudstack.api.command; | package org.apache.cloudstack.api.command; | ||||||
| 
 | 
 | ||||||
| import com.cloud.utils.Pair; | import com.cloud.utils.Pair; | ||||||
|  | import org.apache.cloudstack.api.ACL; | ||||||
| import org.apache.cloudstack.api.APICommand; | import org.apache.cloudstack.api.APICommand; | ||||||
| import org.apache.cloudstack.api.ApiConstants; | import org.apache.cloudstack.api.ApiConstants; | ||||||
| import org.apache.cloudstack.api.BaseCmd; | import org.apache.cloudstack.api.BaseCmd; | ||||||
| @ -32,6 +33,7 @@ import javax.inject.Inject; | |||||||
|         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) |         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) | ||||||
| public class QuotaConfigureEmailCmd extends BaseCmd { | public class QuotaConfigureEmailCmd extends BaseCmd { | ||||||
| 
 | 
 | ||||||
|  |     @ACL | ||||||
|     @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, required = true, |     @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, required = true, | ||||||
|             description = "Account ID for which to configure quota template email or min balance") |             description = "Account ID for which to configure quota template email or min balance") | ||||||
|     private long accountId; |     private long accountId; | ||||||
|  | |||||||
| @ -16,7 +16,7 @@ | |||||||
| //under the License. | //under the License. | ||||||
| package org.apache.cloudstack.api.command; | package org.apache.cloudstack.api.command; | ||||||
| 
 | 
 | ||||||
| import com.cloud.user.Account; | import org.apache.cloudstack.api.ACL; | ||||||
| import org.apache.cloudstack.api.APICommand; | import org.apache.cloudstack.api.APICommand; | ||||||
| import org.apache.cloudstack.api.ApiConstants; | import org.apache.cloudstack.api.ApiConstants; | ||||||
| import org.apache.cloudstack.api.BaseCmd; | import org.apache.cloudstack.api.BaseCmd; | ||||||
| @ -32,6 +32,7 @@ import javax.inject.Inject; | |||||||
|         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) |         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) | ||||||
| public class QuotaListEmailConfigurationCmd extends BaseCmd { | public class QuotaListEmailConfigurationCmd extends BaseCmd { | ||||||
| 
 | 
 | ||||||
|  |     @ACL | ||||||
|     @Parameter(name = ApiConstants.ACCOUNT_ID, type = BaseCmd.CommandType.UUID, entityType = AccountResponse.class, required = true, |     @Parameter(name = ApiConstants.ACCOUNT_ID, type = BaseCmd.CommandType.UUID, entityType = AccountResponse.class, required = true, | ||||||
|             description = "Account ID for which to list quota template email configurations") |             description = "Account ID for which to list quota template email configurations") | ||||||
|     private long accountId; |     private long accountId; | ||||||
| @ -49,6 +50,6 @@ public class QuotaListEmailConfigurationCmd extends BaseCmd { | |||||||
| 
 | 
 | ||||||
|     @Override |     @Override | ||||||
|     public long getEntityOwnerId() { |     public long getEntityOwnerId() { | ||||||
|         return Account.ACCOUNT_ID_SYSTEM; |         return accountId; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user