Sha256: 48088abac4dbb60ddd9d563add46305a463378b67f0e5b905ac88faa9319e49a

Contents?: true

Size: 1.33 KB

Versions: 16

Compression:

Stored size: 1.33 KB

Contents

# For managing system wide settings, sites, etc
#------------------------------------------------------------------------------
class DmCore::Admin::SystemController < DmCore::Admin::AdminController
  include DmCore::PermittedParams
  
  before_filter   :authorize_access

  #------------------------------------------------------------------------------
  def show
    @accounts = Account.unscoped.all.order(:domain)
  end

  #------------------------------------------------------------------------------
  def general
    if put_or_post?
      @account.general_validation = true
      if @account.update_attributes(account_params)
        redirect_to(dm_core.admin_account_general_path, notice: "Account was successfully updated.") and return
      else
        render action: "general"
      end
    end
  end

protected

  #------------------------------------------------------------------------------
  def authorize_access
    unless is_sysadmin?
      flash[:alert] = "Unauthorized Access!"
      redirect_to current_account.index_path 
    end
  end

private

  # Set some values for the template based on the controller
  #------------------------------------------------------------------------------
  def template_setup
    content_for :content_title,     "System Administration"
    content_for :content_subtitle,  "Multi-site Management"
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_core-4.2.3.10 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.9 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.8 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.7 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.6 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.5 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.4 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.3 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.2 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3.1 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.3 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.2.3 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.2.2 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.2.1 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.2 app/controllers/dm_core/admin/system_controller.rb
dm_core-4.2.1.5 app/controllers/dm_core/admin/system_controller.rb