Skip to content

Instantly share code, notes, and snippets.

@iwarshak
Created September 15, 2009 22:12
Show Gist options
  • Save iwarshak/187697 to your computer and use it in GitHub Desktop.
Save iwarshak/187697 to your computer and use it in GitHub Desktop.
Author: ian <ian@rightscale.com>
Date: Tue Sep 15 17:12:05 2009 -0500
refs #4568 - a deployment can have ST that do not belong to the account. do not be so restrictive on the STE (server template executabl
diff --git a/app/controllers/deployments_controller.rb b/app/controllers/deployments_controller.rb
index 09cd380..7a9a565 100644
--- a/app/controllers/deployments_controller.rb
+++ b/app/controllers/deployments_controller.rb
@@ -435,7 +435,7 @@ class DeploymentsController < ApplicationController
def show_servers_script
show_prep
include_chef_recipes = current_account.has_setting?('chef')
- @action_executable = current_account.server_template_executables.find(params[:action_executable_id])
+ @action_executable = ServerTemplateExecutable.find(params[:action_executable_id])
op_executables, boot_executables, decommission_executables = @deployment.get_all_executables(include_chef_recipes)
all_executables = op_executables.keys + boot_executables.keys + decommission_executables.keys
# checking if the ServerTemplateExecutable is accessible to the current_account will not always work as a head version
diff --git a/app/controllers/server_arrays_controller.rb b/app/controllers/server_arrays_controller.rb
index 7caa3d0..c199515 100644
--- a/app/controllers/server_arrays_controller.rb
+++ b/app/controllers/server_arrays_controller.rb
@@ -335,7 +335,7 @@ class ServerArraysController < ApplicationController
# find the ServerTemplates that are used in this server array and by this rightscript
@server_array.get_all_server_templates.each {|template| @templates << template if template.right_scripts.include?(@action_right_scri
elsif params[:action_executable_id] # Running a ServerTemplateExecutable
- @action_executable = current_account.server_template_executables.find(params[:action_executable_id])
+ @action_executable = ServerTemplateExecutable.find(params[:action_executable_id])
@server_array.get_all_server_templates.each { |template| @templates << template if template.includes_executable?(@action_executable)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment