Sha256: 09429ef96295bea52c41b5968eef0e591e5945629f60d4c98267ad06b447377c

Contents?: true

Size: 558 Bytes

Versions: 1

Compression:

Stored size: 558 Bytes

Contents

#
# Blogaze
# Copyright (C) 2011-2013 Jack Polgar
#
# Blogaze is released under the BSD 3-clause license.
# @license http://opensource.org/licenses/BSD-3-Clause
#

module Blogaze
  module Admin
    class Controller < ::Blogaze::Controller
      layout 'admin'
      helper :blue_form

      def initialize
        super

        if !@userinfo.respond_to?('group') or !@userinfo.group.is_admin
          redirect '/login'
        end
      end
    end
  end

  Dir.glob(File.dirname(__FILE__) + '/*.rb').each do |controller|
    require(controller)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blogaze-0.0.1 lib/blogaze/controller/admin/init.rb