Sha256: 8f4e8639d758710d071f4bb41d9dd5efe3f716eb4d7fb07ca63700ac1947810c

Contents?: true

Size: 648 Bytes

Versions: 1

Compression:

Stored size: 648 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 Controllers
    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 # Controller
    end # Admin
  end # Controllers
end # Blogaze

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blogaze-0.0.2 lib/blogaze/controllers/admin/init.rb