Displaying 20 results from an estimated 4000 matches similar to: "You are being redirected message"
2006 May 19
0
No luck with multiple before_filters
I''ve got these two lines set up in my controller
before_filter :check_authentication
before_filter :check_max_hands, :only => [ :play ]
Here''s the corresponding code for each
def check_authentication
unless session[:user] and authorize?(session[:user])
session[:intended_action] = request.request_uri
redirect_to :controller => ''user'',
2006 Apr 21
1
Catch authentication result from a model in a controller
Im still following the authorization recipe from the book, now all works
fine but im getting trouble in how handle the model authorization
result, if the user and pass are correct, it goes to a welcome
screen(admin.rhtml) but if wrong the model prints a message in an ugly
exception like page "usr and pass not correct", i want to redirect the
user to the login
2006 May 16
2
before_filter and the application controller
Hi there,
I''m having a bit of an issue with my before_filter. I know that the filters
put in the application.rb controller are global for all the controllers. In
my application filter I''d like to allow access to the RSS feed method in a
''member'' controller and skip the login checks that the before_filters are
currently performing.
In my application my filters
2006 Jun 30
8
before_filter: nil vs. true vs. false
Folks,
My understanding of how filters work is that I should return true if
everything is ok and false if not. How does the filter below work
then (from the Rails Recipies book)?
It would return nil if there''s a user in the session. Does nil count
as true?
before_filter :check_authentication
def check_authentication
unless session[:user]
session[:intended_action] =
2006 Feb 28
1
Oracle OraNumber problem with Authentication. Please help!
I have added an authenticator using the instructions here:
http://wiki.rubyonrails.org/rails/pages/HowtoAuthenticate
The LoginController sets session["employee"] to an employee.
When i try to access the session["employee"] from another controller i
get this error :
"
TypeError (no marshal_dump is defined for class OraNumber):
c:/ruby/lib/ruby/1.8/pstore.rb:159:in
2005 Nov 25
0
Login Authentication working in IE but not in Mozilla
I have gone through the following site for the creation of my login
page:
To mention I am using Windows XP pfofessional running on WEBBrick server
http://wiki.rubyonrails.com/rails/pages/HowtoAuthenticate
The code is given in the following 3 steps:
1)The controller that needs protection:
class WeblogController < ActionController::Base
before_filter :authenticate
def index
# show
2008 Jan 14
0
Controoler/View problem
Hi i''m new with ruby on rails. And i''m trying to build an application
with an authentication method, I''m using the Recipe from the book
"Rails Recipes". The thing is that i wrote the procedure inside the
Login controller class, but when i try to access it I got an exception
that say "couldn''t find Login With ID=signin" (signin is the method
2008 Jan 30
2
Where can I get "authenticate_with_http_basic"?
Hi,
I just installed Rails 2.0.2
[root@mymachine easyx]# ruby --version
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]
[root@mymachine easyrx]# gem install rails --include-dependencies
Need to update 16 gems from http://gems.rubyforge.org
................
complete
Successfully installed rails-2.0.2
[root@remandev easyrx]#
But I''m getting this error in my restful_authentication
2008 Jun 13
3
before_filter order of execution
Hi
I''m trying to use before_filter to allow access to a site. Only logged
in users can view any object in the controller, but only users with a
access_level higher than 2 can view specific objects. My code is:
-----------------------------------------------------------
IN USER_CONTROLLER
before_filter :login_required
before_filter :access_granted, :only => [:destroy, :new , :edit]
2010 Feb 19
0
You are being redirected
I have done something to my application controller so that instead of
the redirected page itself am now seeing this as a response:
<html><body>You are being <a href="http://www.example.com/
welcome">redirected</a>.</body></html>
I do not know why this is happening or what I did to trigger this
behaviour. The API does not give me any clues as to
2006 Jul 07
13
Rails Recipes Book: Authentication
Hi,
The user/login management system in Chapter 31: Authenticating Your
Users and Chapter 32: Authorizing Users with Roles of Chad Fowler''s
Rails Recipes looks reasonable and adequate. However, when I ran the
Chapter 31 code, I get the following error:
Username or password invalid
And I am not even given the chance to sign in; that is, the signin form
does not appear at all.
Has
2007 Feb 21
1
setting session data from a post
I''m using acts_as_authenticated, and I''m trying to run some tests where
the user must be registered. In the past, I''ve just included a user id
in the session data.
def test_login_loads_from_post_session
post :new, nil, { :user => 7 }
session = assigns(:session)
assert_equal 7, session[:user]
end
My assert statement seems to be failing because my session is
2007 Jan 21
0
Functional Test Fails with before filter in application.rb
Hi There,
I am trying to write my first tests for a role bassed authentication
taken from Rails Recipies. Whenever I add:
assert_redirected_to :action => ''login''
I get the following error:
NoMethodError: undefined method `first'' for :user:Symbol
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/assertions/response_assertions.rb:72:in
2008 Oct 03
2
Filter chain halted as [:check_authentication] rendered_or_r
I have this page that you login in from. You get authenticated and then
bumped over to the appropriate page depending on what your role is:
Traveler, Travel Manager, Admin. All pieced work except for the role
asssociated with Travel Managers who get tossed out, apprarently when
they hit a before_filter to check authenication. However, it seams that
they are properly getting authenticated and moved
2006 Aug 01
0
How to retrieve :web when redirecting to an Instiki page?
Hello, I am currently working on implementing some authentification code
onto Instiki (0.11.0). I am encountering a problem in this situation :
When I try to access say http:/localhost:2500/orz/show/Test , where orz
is an instiki web name, I am redirected to my signin form screen (which
is what I want) but then upon signing in I get the following message:
No url can be generated for the hash
2004 Oct 24
0
redirection bug ?
Hi
I use code from authentication example from ruby on rails web page.
Everything looked fine until i found thet when i log for the first time it
gives me bad redirection. When session[''return_to''] was set everythig
had been fine so i changed (look into my code) from 1 to 2.
this is from login controler
def login
if
2012 Feb 18
0
Rails NameError : uninitialized constant RelationshipsController
I am trying to run a test of my app buy my
relationships_controller_spec.rb file won''t run. Here''s the error I
get:
Exception encountered: #<NameError: uninitialized constant
RelationshipsController>
Here''s the code for my relationships_controller_spec.rb file:
require ''spec_helper''
describe RelationshipsController do
describe "access
2008 Nov 05
3
Problems w/ before_filter getting ignored
Hello,
I''m setting up an authentication module that will be called from
application.rb. I want to save a rrequest.request_uri into a
session to be used as a place holder that
will take users back to the page they were on before they logged in.
I''m trying to call the store_location method for all methods EXCEPT
login by putting login in an except before filter.
For some
2011 May 08
5
Am I being to paranoid?
Hi All,
I want to know thoughts on if I am being to paranoid/security conscious.
CentOS 5.6, Apache, MySQL, running an Firewall in front of everything and obviously the built-in firewall on the box. I have ssh on a different port and starting to use Keys instead of password authentication. I host an intensive website and I am getting about 150 unique visitors per day.
What I am seeing is
2006 Jul 05
1
RuntimeError with Rails Recipe "Authenticating Your Users"
HI,
I''ve gotten this Rails Recipe running fine (a bit before I completely
understand it) except when the signin is incorrect I return an
error(below). All I want is to either have the incorrect signin
redirected to "store" rhtml
or to a refreshed and empty signin. Any clues???
TIA
Chas
######From Browser ##### http://localhost:3000/admin/signin
RuntimeError in