Sha256: 4e4803fc7cced46ba0a5f2ec9bbc443308d578bd03450aa611f74e3c01ddbfba

Contents?: true

Size: 869 Bytes

Versions: 21

Compression:

Stored size: 869 Bytes

Contents

class CreateSecurityManagementDesktopApplication
  def self.up
    app = DesktopApplication.create(
      :description => 'Security Management',
      :icon => 'icon-key',
      :javascript_class_name => 'Compass.ErpApp.Desktop.Applications.SecurityManagement',
      :internal_identifier => 'security_management',
      :shortcut_id => 'security_management-win'
    )
    pt1 = PreferenceType.iid('desktop_shortcut')
    pt1.preferenced_records << app
    pt1.save

    pt2 = PreferenceType.iid('autoload_application')
    pt2.preferenced_records << app
    pt2.save
    
    admin_user = User.find_by_username('admin')
    if admin_user
      admin_user.desktop.applications << app
      admin_user.desktop.save
    end
  end

  def self.down
    DesktopApplication.destroy_all(['internal_identifier = ?','security_management'])
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
erp_app-4.0.0 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.16 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.15 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.14 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.13 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.12 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.11 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.10 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.9 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.8 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.7 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.6 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.5 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.4 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.3 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.2 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.0.16 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.0.15 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.1 db/data_migrations/20121218175028_create_security_management_desktop_application.rb
erp_app-3.1.0 db/data_migrations/20121218175028_create_security_management_desktop_application.rb