Class: Blogaze::Controllers::Admin::Controller
- Inherits:
-
Controller
- Object
- Ramaze::Controller
- Controller
- Blogaze::Controllers::Admin::Controller
- Defined in:
- lib/blogaze/controllers/admin/init.rb
Instance Method Summary collapse
-
#initialize ⇒ Controller
constructor
A new instance of Controller.
Methods inherited from Controller
#get_settings, #title, #view_file
Constructor Details
#initialize ⇒ Controller
Returns a new instance of Controller.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/blogaze/controllers/admin/init.rb', line 16 def initialize super # Set AdminCP title title "Admin" # Make sure the user is logged in and has permission if !@userinfo.respond_to?('group') or @userinfo.group.is_admin != 1 redirect '/login' end end |