Sha256: 285af1959f77264ae9b9b5bc878ab1b057d82ab8eaa2b06d16d4dd102c3c2fee
Contents?: true
Size: 514 Bytes
Versions: 2
Compression:
Stored size: 514 Bytes
Contents
# This helper should be included to all Admin plugins. Provides # security and other utilities. module AdminHelper def self.included(base) super base.before :authorize end #-- # Generally you do not override this method. #++ def authorize unless authorized_user? print 'Access denied' exit end end # Is the user authorizes to browse Admin pages? # #-- # Override this method in your application #++ def authorized_user? return true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.41.0 | lib/part/admin/helper.rb |
nitro-0.40.0 | lib/part/admin/helper.rb |