This helper should be included to all Admin plugins. Provides security and other utilities.
Methods
Public Class methods
[ show source ]
# File lib/nitro/part/admin/helper.rb, line 5 5: def self.included(base) 6: super 7: base.before(:call => :authorize) 8: end
Public Instance methods
[ show source ]
# File lib/nitro/part/admin/helper.rb, line 14
14: def authorize
15: unless authorized_user?
16: print 'Access denied'
17: exit
18: end
19: end
Is the user authorizes to browse Admin pages?
[ show source ]
# File lib/nitro/part/admin/helper.rb, line 27
27: def authorized_user?
28: return true
29: end