Displaying 20 results from an estimated 700 matches similar to: "Filter chain halted as [:check_authentication] rendered_or_r"
2009 Feb 04
2
rendering error page for "Unauthorized" from before_filter
Hey all,
I am writing a plugin in which I want to stop the rendering of an
action with an unauthorized response if the user is not authorized to
view the resource. I am using a before filter to achieve this and
inside that before filter I do it like so:
render :text => "Unauthorized!", :status => :unauthorized, :layout
=> false
The status is properly set since I see the
2008 Sep 26
1
Problem with authentication... Acts As Authenticated
Hello,
I am working on the API of our webservice. API users need to
authenticate some of their calls...
When I am performig the call through Firefox, everything is fine as
shown in the log :
Processing OwnershipsController#new (for 67.207.118.174 at 2008-09-26
16:20:03) [GET]
Session ID:
BAh7BiIKKmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
2006 Jun 04
5
filter function with parameter
Hi!
I want to add a function with a static paramter ("2" in the example) to
a filter, but somehow Rails seems to be looking for another syntax.
before_filter :check_quantity(2), :only => [:show]
doesn''t work. What''s the right way to do this?
Thanks a lot!
--
Posted via http://www.ruby-forum.com/.
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 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
2010 May 10
1
Rails/mongrel/httpd issue - F13, rails 2.3.5
Hi,
I have an issue with mongrel and rails. I add -B option(debug) to mongrel_rails in /etc/init.d/mongrel-rails but it didn't display more logs : http://ovirt.pastebin.com/N5v94cTu
This is the page I get when I try to reach the ovirt web interface, I see the html tags (kerberos auth is working) :
<html><body>You are being <a
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 Apr 27
7
Role Based Authorization recipe implementation?
i got the rails recipes book, i have now an auth system for users
without problems, now i want to made a role based acces for my app, im
following the "Role Based Authorization" recipe of the book but i cant
make it to work even when the tables created and correctly added data
manually definig the roles and rights. als i dont know how to define a
right for use all the actions in a
2006 Nov 04
3
role based authorization question
I am using the the authorization recipe outlined in Rails Recipes.Is it
possible for one role, say ''admin'', to have access to every action on every
controller without explicitly having to create a Right for each?
I know this will not work as is, and to force it to do so would violate MVC,
but is there some other way to accomplish having something like this in a
controller:
2006 Aug 07
2
Ugggh..another recipes question
sorry, because it seems that I need more explanation on this Rails
Recipes authorization -
I finally got the code working but after using the login I get this
back from Rails-
Routing Error
No url can be generated for the hash {}
I''m guessing it''s coming from the redirect-
def login
if request.post?
session[:user] = User.authenticate(params[:first_name],
2006 Sep 21
0
TimeZone in ls -lna listings
Hi,
I have a strange situation where when I get different timestamps depending
on if a use ls -l or ls -ln:
---------------
sftp> ls -l
-rw-rw-rw- 1 0 0 39649 Sep 20 11:30
C20060920.1115-20060920.1130
sftp> ls -ln
-rw------- 0 0 0 39649 Sep 20 13:30
C20060920.1115-20060920.1130
--------------
The machine is in timezone UTC+2. According to the
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] =
2009 May 03
0
HTTP Auth 401 Even on Valid Login
I can''t understand why authenticate_or_request_with_http_basic keeps
failing even though I am entering the correct info.
If I try to access /admin/items/new, I enter the correct info but I
keep getting prompted.
The strange part is that when I cancel out, I get "HTTP Basic: Acce".
Here''s the controllers:
class Admin::BaseController < ApplicationController
2009 Apr 09
0
HTTP Digest Authentication not working
Hi to all,
I''ve created a new project with Rails 2.3.2 and literally copied the
HTTP Digest Authententication example from the documentation into a
SecretsController:
class SecretsController < ApplicationController
Users = {"dhh" => "secret"}
before_filter :authenticate
def secret
render :text => "Password Required!"
end
private
2007 Jul 17
12
Getting past my login system
Thank you in advance for your help. I am relatively new to both Rails
and Rspec and I am hoping for some insight from some experienced veterans.
Right now I am using Rspec for code that has already been written so
that additional functionality can be developed using the BDD method. My
problem shows up when I try to spec controllers that are behind the
login system. Each page checks for the
2008 Jun 30
1
ctree (party) plot meaning question
I tried to use ctree but am not sure about the meaning of the plot.
My.data.ct<-ctree(Resp~., data=My.data)
plot(My.data.ct)
My data.frame contains 88 explanatory variables (continous,ordered/unordered
multistate,count data) and one response with two groups.
In the plot are only two variables shown (2 internal nodes) and 3 final
nodes. Does it mean that only these two variables show a
2017 Mar 13
1
dovecot: master: Dovecot v2.2.22 (fe789d2) starting up for imap, pop3 (core dumps disabled)
Hi.
Always the below log appraring log under /var/log/mail.log
Is this right or How to resolve it.
Ubuntu 16.04.2 LTS server edition
Mar 13 06:13:20 home dovecot: master: Dovecot v2.2.22 (fe789d2) starting up
for imap, pop3 (core dumps disabled)
Mar 13 06:13:30 home postfix/master[1495]: daemon started -- version 3.1.0,
configuration /etc/postfix
dovecot -n output
2010 Jul 16
0
No more filter chain halted messages?
I''ve been trying to debug test failures when converting my project to
rails 3, and I noticed that controllers are redirecting inside of
before filters. It''s very difficult to figure out which of my 8
before_filters caused the unexpected redirect, however, since the
"filter chain halted as XXX rendered or redirected" message is MIA. I
read through the new
2007 Nov 20
2
After Filter Runs Even When Chain Is Halted
For a particular set of actions, I have a before and an after filter.
When the before filter returns false, however, the after filter still
executes (which I can tell because an error is being thrown from it.)
I know the before filter successfully returns false, because the logs
show that the chain was halted.
What could be causing the after filter to run despite the halting of
the chain in the
2010 Apr 26
2
woriking under webrick but not under passenger
Hi!
I have just added login feature to my rails application (followed the
instruction from (Agile Web Development with Rails) but now I am getting
strange errors (looks to me like some kind of routing problem) under the
passenger/apache.
The error is:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
From the log: