mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	Only do 'listSwifts' for admin accounts
This commit is contained in:
		
							parent
							
								
									bab60829ea
								
							
						
					
					
						commit
						4a8c431ee3
					
				@ -234,17 +234,21 @@
 | 
			
		||||
                args.response.error();
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
											
 | 
			
		||||
						$.ajax({
 | 
			
		||||
						  url: createURL("listSwifts"),
 | 
			
		||||
							dataType: "json",
 | 
			
		||||
							async: false,
 | 
			
		||||
							success: function(json) {							  
 | 
			
		||||
								var items = json.ListSwiftresponse.swift;
 | 
			
		||||
								if(items != null && items.length > 0) 
 | 
			
		||||
								  havingSwift = true;								
 | 
			
		||||
							}
 | 
			
		||||
						});					
 | 
			
		||||
 | 
			
		||||
            if (isAdmin()) {
 | 
			
		||||
              $.ajax({
 | 
			
		||||
                url: createURL("listSwifts"),
 | 
			
		||||
                dataType: "json",
 | 
			
		||||
                async: false,
 | 
			
		||||
                success: function(json) {
 | 
			
		||||
                  var items = json.ListSwiftresponse.swift;
 | 
			
		||||
                  if(items != null && items.length > 0)
 | 
			
		||||
                    havingSwift = true;
 | 
			
		||||
                }
 | 
			
		||||
              });
 | 
			
		||||
            } else {
 | 
			
		||||
              havingSwift = false;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // Get project configuration
 | 
			
		||||
            // TEMPORARY -- replace w/ output of capability response, etc., once implemented
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user