similar to: Help with Access Control

Displaying 20 results from an estimated 400 matches similar to: "Help with Access Control"

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:
2007 Oct 23
11
validates_confirmation_of not working?
I just can''t get validates_confirmation_of working for the life of me!... It''s not the first time I''m having problems with it but I just never understand why!... This time I pretty much followed *exactly* the example in Agile Rails Development and still...it just won''t work! I put 2 different passwords in the form and it doesn''t trigger an error,
2008 Sep 12
1
restful_authentication rspec failures "Mysql::Error: Incorrect datetime value:"
I am getting 193 failures that all have "Mysql::Error: Incorrect datetime value:" how do i fix this??? i am new to rspec and restful_auth, so if i am doing something wrong, let me know!!! windows xp rails 2.1.1 rails testproject cd testproject # create my databases and edit database.yml git init git submodule add git://github.com/dchelimsky/rspec.git vendor/plugins/ rspec git
2008 Jun 29
3
Working around/with Restful Authentication
I''m using Restful Authentication, and the code to create a user is pretty straight forward - there is a before_save action and a before_create action: before_save :encrypt_password before_create :make_activation_code But for some reason when I try to create a user programmatically in the controller like this: User.new(:email =>
2007 Dec 21
0
db:migrate problem
I''m having a bit of trouble getting a rails project to build properly within cruisecontrolrb. My cruise task is in lib/tasks/my_project.rake, and looks like this: task :cruise => [''db:test:purge'', ''db:migrate'', ''db:test:prepare'', ''test:coverage:clean'', ''test:coverage:prepare'',
2007 Sep 20
1
Relationship Proxies?
I''m trying to understand these results in irb, which implies that there''s some kind of proxy at play: >> aaron = User.find_by_login ''aaron'' => #<User:0xb7109cdc @attributes={"salt"=>"7e3041ebc2fc05a40c60028e2c4901a81035d3cd", "updated_at"=>nil, "contact_info_id"=>nil,
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
Hello all, I just ran into something that I think is a bug, and I would like to confirm with the core team whether this is expected/desired behavior or if this is a bug that I should file and develop failing tests for (I doubt I have the active record method_missing fu to actually patch it). Test Scenario: I would like to find or initialize a new user and base the find on the users email
2007 Jul 09
3
NoMethodError when using find_by_sql
I''m try to verify users on login. Here is my code: def self.authenticate(username,password,account_code) employee = self.find(:all, :select => "e.id, e.first_name, e.last_name, e.username, e.account_id, e.department_id, o.pay_type_id, o.admin_yn, o.payroll_yn, o.files_yn, o.dept_report_yn,e.salt, e.hashed_password", :conditions => ["e.deleted_yn=0 and
2007 Jul 18
3
Help. Acts_as_Authenticated plugin stops working for me?
Hi, I successfully installed AAA couple days before, and i managed to register a uer with it, with no user activation. but for some strange reason, it stops working for the signup method, with i go to the signup page, press submit, it shows an error page, what''s wrong? here''s the error page. undefined method `activation_code'' for #<User:0x3b6dbd
2007 Dec 16
2
restful_authentication: update of users' attributes on every page load upon 'Remember me' being enabled?
Hello there, I just noticed a kinda weird thing: if users log in with the ''Remember Me'' option enabled, their records in the db get updated everytime the user reloads a page, because apparently restful_authentication''s code updates the remember_token_expires_at & remember_token attributes for each page load (not only once on the actual login (from cookie).
2006 Jul 06
1
Problem implementing password and password confirmation
Hi, I''m trying to implement password confirmation, based on the Agile example, but just can''t make any progress. User DB has these fields: ========================= t.column :name, :string, :limit => 40 t.column :hashed_password, :string t.column :salt, :string User model has: =============== attr_accessor :password_confirmation
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
2010 Oct 11
5
Object lost in memory/trashed?
Hi, I''ve got a problem on which I''ve spent many hours, and I can''t get a clue on what is happening... I hope someone here will be able to help me. Here is the situation : my Rails app uses acts_as_commentable and acts_as_bookmarkable on a Diagram model. Everything''s working OK individually: I can create a comment on a Diagram, bookmark it, and so on. Now,
2008 Jun 20
15
before_save model callback rspec testing
hi all, i''m learning rspec and i can''t figure out how to test if a callback is executed in a model. my model code is: class User < ActiveRecord::Base before_save :encrypt_password ... def encrypt(password) self.class.encrypt(password, salt) end thanks a lot, cs. -- Posted via http://www.ruby-forum.com/.
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such column: books.user_id: SELECT "books".* FROM "books" WHERE ("books".user_id = 4)" ,which sounds like there is no user_id in books table.So i just installed foreigner plugin and added " t.integer :user_id, :null => false" and "add_foreign_key(:books, :users)" in book
2007 Feb 10
5
acts_as_authenticated strangeness
hi the strangest thing is happening. on my local machine acts_as_authenticated works fine, but whe on the server [dreamhost] it refuses to log in. no error messages. nothing. just reloads the login page again. here`s my action: def login return unless request.post? flash[:notice] = "Incorrent login" self.current_user = User.authenticate(params[:login], params[:password])
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here: http://railstutorial.org/chapters/sign-in-sign-out#top At the end of the tutorial, rails is erroring (see below). being new to Rails and after having checked the tutorial... How do you resolve this kind of error. It''s saying current_user is not defined, and it is supposed to be defined with/Sites/sample_app/app/helpers/
2012 Nov 19
0
has_one :through NoMethodError: undefined method `klass' for nil:NilClass when doing class_name on reflection
Not sure if this is expected or not. Only happened with a has_one :through I had setup. (Workaround is just to remove it and go through the association manually vs has_one ..., through: .) Not a big deal if no one has time to look at it, as it''s not a big enough deal to look into a fix on our side. In Rails (3.2.9) console if I do: MyModel.reflections.each {|name,reflection|
2000 Feb 26
1
OpenSSH on HP-UX 11 with TCB
Hi, an updated and more civilized post (to my one and only previous one) on getting OpenSSH to work on HP-UX 11 using the TCB. I used the HP ANSI C compiler. Firstly, I needed to download, compile and install OpenSSL, EGD and ZLib. Specific issues: configure did not handle hpux 11 login.c did not compile makefile did not use $(CFLAGS) sshd did not compile (pam issues), I wanted to use
2009 Nov 14
3
authlogic fails on existing accounts when crypted_password is blank
I recently ran a migration to add the following to an existing user model: t.string "crypted_password" t.string "password_salt" t.string "persistence_token" There is an existing (cleartext) password field, but authlogic doesn''t seem to be reading that on existing accounts. As a result, all logins for existing accounts fail. How can I get