Sha256: 13d6b321426705a8d05cf099d7dc20f8caa98de09f017b4367db16e68b8b001b

Contents?: true

Size: 711 Bytes

Versions: 29

Compression:

Stored size: 711 Bytes

Contents

class Cms::SetupController < ApplicationController
  # filters and other customizations can be made here before the cms controllers are run

  # Returns the current user for the application.
  # Remove this method if your application already defines a current_user method
  # or provide valid code that returns a user object for the current user.
  def current_user
    nil
  end

  # Define your own authorization logic given one of the cms roles... :all, :cms_admin, :cms_user
  def authorize_role(role)
    authorized = case role
    when :all, :cms_admin, :cms_user
      #current_user.present?
      true
    else
      false
    end

    redirect_to '/' unless authorized

    return authorized
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
liquid_cms-0.3.2.0 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.2.0 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.1.1 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.3.1.0 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.1.0 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.0.13 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.3.0.10 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.3.0.9 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.0.12 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.0.11 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.0.10 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.3.0.8 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.0.9 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.3.0.7 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.3.0.6 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.0.8 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.3.0.5 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.0.7 generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.3.0.4 lib/generators/liquid_cms/templates/setup_controller.rb
liquid_cms-0.2.0.6 generators/liquid_cms/templates/setup_controller.rb