Module: AdminHelper
- Defined in:
- lib/part/admin/helper.rb
Overview
This helper should be included to all Admin plugins. Provides security and other utilities.
Class Method Summary collapse
Instance Method Summary collapse
-
#authorize ⇒ Object
– Generally you do not override this method.
-
#authorized_user? ⇒ Boolean
Is the user authorizes to browse Admin pages?.
Class Method Details
.included(base) ⇒ Object
5 6 7 8 |
# File 'lib/part/admin/helper.rb', line 5 def self.included(base) super base.before :authorize end |
Instance Method Details
#authorize ⇒ Object
– Generally you do not override this method. ++
14 15 16 17 18 19 |
# File 'lib/part/admin/helper.rb', line 14 def unless print 'Access denied' exit end end |
#authorized_user? ⇒ Boolean
Is the user authorizes to browse Admin pages?
– Override this method in your application ++
27 28 29 |
# File 'lib/part/admin/helper.rb', line 27 def return true end |