class UpdateMenuImpersonateRevert < ActiveRecord::Migration
  def self.up
    permission = Permission.find_by_name("do assignments")
    
    site_controller = SiteController.find_by_name("impersonate")
    action = ControllerAction.find(:first, :conditions => ['name = "restore" and site_controller_id = ?',site_controller.id])
    action.name = "impersonate"
    action.permission_id = permission.id
    action.save
    
    Role.rebuild_cache          
  end

  def self.down
  end
end

Correct revision so that it works when a user is impersonated
Correct revision so that it works when a user is impersonated

git-svn-id: f67d969b640da65cb7bc1d229e09fd6d2db44ae1@755 392d7b7b-3f31-0410-9dc3-c95a9635ea79
