Class: Ext::Security::Controllers::Unauthorized

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/security.rb

Overview

Called when an url is not authorized. You can override this is your app. Or create an ‘unauthorized` view. @bad_user is the user name.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.urlsObject

do not serve urls directly.



93
# File 'lib/ext/security.rb', line 93

def self.urls; [] end

Instance Method Details

#get(bad_user) ⇒ Object



95
96
97
98
99
100
# File 'lib/ext/security.rb', line 95

def get(bad_user)
  @bad_user = bad_user
  if has_view?(:unauthorized)
    render(:unauthorized)
  else "Unauthorized user : #@bad_user" end
end