Sha256: a243d1bbed48e2a7513089c3503e88942c5a82dc8762f825b3914ae3ecb1b7fc
Contents?: true
Size: 556 Bytes
Versions: 23
Compression:
Stored size: 556 Bytes
Contents
require 'rhoconnect/middleware/helpers' module Rhoconnect module Condition module LoginRequired def self.extended(base) base.include_login_required_condition end def include_login_required_condition set(:login_required) do |value| #puts "lgin kls is #{self.to_s}" condition do if value throw :halt, [401, {'Content-Type' => 'text/plain'}, "Not authenticated"] if @env[Rhoconnect::CURRENT_USER].nil? end end end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems