search for: delete_user

Displaying 18 results from an estimated 18 matches for "delete_user".

Did you mean: delete_users
2006 Feb 05
8
Agile Rails book: depot problem 2
My second problem is: Listing users, and deleting them doesn''t work. If I try to list user, i just get this list: User Delete User Delete User Delete User Delete I''m using this code in the login_controller: def list_users @all_users = User.find(:all) end def delete_user @id = params[:id] if id && user = User.find(id) begin User.destroy flash[:notice] = "User #{user.name} deleted" rescue flash[:notice] = "Can''t delete that user" end end redirect_to_index(:action => :list_users) end an...
2006 Mar 19
4
elemental race conditions question
What''s the standard way to prevent race conditions in controllers? Say user has many posts. Post controller has action add_post that receives user id, post controller find()s the user and while he is creating the post entry an administrator deletes that user in a separate session. We cannot assume the database checks foreign key integrity. How do you get that right? -- fxn
2007 Jan 21
1
noob with :method => :post vs. :post => 'true' dilemma
Okay, I''ve worked through the tutorial in 2nd ed. Agile Dev book. And I think I understand the methods concerning user management; however, when I use :method => :post in my app, I get a link of the following variety: <li><a href="/login/delete_user/2" method="post" onclick="return confirm(''Really delete john?'');">[X]</a> john </li> Note the ''method="post"'', and in my log when I click this thing, no ''post'' goes through, and no u...
2004 Mar 01
0
RE: win32etc test failure
For delete_user, try this patch: etc.c, line 639: - lpHost = (LPCWSTR)STR2CSTR(rbHost); +lpHost = AllocWideLString(rbHost); Lemme know how it goes. Dan -----Original Message----- From: win32utils-devel-bounces@rubyforge.org [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of win32utils-devel@rubyfo...
2004 Mar 01
0
RE: win32etc test failure
...de my admin tasks with this module. Thanks a million !! -----Original Message----- From: Berger, Daniel [mailto:djberge@qwest.com] Sent: Monday, March 01, 2004 11:11 AM To: win32utils-devel@rubyforge.org; Date, Shashank [Non-Employee] Subject: RE: [Win32utils-devel] RE: win32etc test failure For delete_user, try this patch: etc.c, line 639: - lpHost = (LPCWSTR)STR2CSTR(rbHost); +lpHost = AllocWideLString(rbHost); Lemme know how it goes. Dan -----Original Message----- From: win32utils-devel-bounces@rubyforge.org [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of win32utils-devel@rubyfo...
2006 Jul 10
7
How to obscure/encrypt password parameter?
Hi all- I am building an application that includes a login screen. During development I found that user passwords are logged by Rails in plain text -- this will not be acceptable to my users. Is there a way to obscure/encrypt incoming password parameters or not write them to the log files at all? One thought was to use Javascript, but I was not sure how secure that would be. Thanks, Josh
2006 Jan 05
2
help - edit without using scaffold
...*************** <table> <% for user in @all_users -%> <tr> <td><%= user.username %></td> <td><%= link_to("(edit)", :action => :edit_user, :id => user.id) %></td> <td><%= link_to("(delete)", :action => :delete_user, :id => user.id) %></td> </tr> <% end -%> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060105/6130d9df/attachment-0001.html
2004 Mar 01
0
RE: win32etc test failure
...-----Original Message----- From: Date, Shashank [Non-Employee] [mailto:Shashank.Date@mail.sprint.com] Sent: Monday, March 01, 2004 9:49 AM To: Berger, Daniel Subject: RE: win32etc test failure My preference: POLS ! Either do it for _all_ the situations, no exceptions OR do not do it at all. delete_user did not work with OR without the \\. getpwnam worked without the \\. Thanks, -- Shashank -----Original Message----- From: Berger, Daniel [mailto:djberge@qwest.com] Sent: Monday, March 01, 2004 10:40 AM To: Date, Shashank [Non-Employee] Subject: RE: win32etc test failure Oops - I think I tried...
2006 Feb 08
1
functional test problem
I am trying to write a test for my delete method. I find a User in the db by its id, do the delete action, then I want to see if it is still in the db. How do I check that the User IS Deleted without causing errors? ** My Test ******************************** def test_delete_user login user = User.find(2) post :delete_user, {:id => user.id} assert_equal "User deleted", flash[:notice] assert_nil User.find(2) assert_redirected_to :action => ''manage_users'' end ** The Error ******************************* 1) Error...
2004 Feb 24
2
win32-etc cvs
Hi all, I''ve got the beginning of win32-etc 0.2.0 checked into cvs. This includes a new sub-module called Admin that includes the add_user, delete_user, and change_password methods. I eventually will add a config_user method as well, plus whatever else I feel like tossing in. :) One issue I''m having is with the change_password - no matter what I try, I always get "invalid password". I tried with straight C as well, to no...
2004 Mar 01
0
RE: win32etc test failure
...-----Original Message----- From: Date, Shashank [Non-Employee] [mailto:Shashank.Date@mail.sprint.com] Sent: Monday, March 01, 2004 9:49 AM To: Berger, Daniel Subject: RE: win32etc test failure My preference: POLS ! Either do it for _all_ the situations, no exceptions OR do not do it at all. delete_user did not work with OR without the \\. getpwnam worked without the \\. Thanks, -- Shashank -----Original Message----- From: Berger, Daniel [mailto:djberge@qwest.com] Sent: Monday, March 01, 2004 10:40 AM To: Date, Shashank [Non-Employee] Subject: RE: win32etc test failure Oops - I think I tried...
2006 Jun 23
10
Don''t un-admin the last administrator
I have a User class with a field called admin which is a boolean that determines if the user is or is not an administrator. I want to make it impossible for the last administrator for an account to be removed from the system. I need to protect against this both when deleting a user and when editing a user as you can revoke a user''s administrator privileges via a form. User
2006 Jan 03
7
best authorization?
Hello, I want to allow some users to manage other user accounts, but do not want them to manage the admin account. I have tried auth_generator, login_engine and user_engine I am having a hard time gettign this to work. Looking for advise and help. Thanks Frank -------------- next part -------------- An HTML attachment was scrubbed... URL:
2008 Mar 01
2
No route matches with {:method=>:get} Error in AWDWR Book
...login but when I go to http://localhost:3000/login/index I get this error: No route matches "/login/index" with {:method=>:get} I haven''t touched the routes.rb file and when I generated the controller I went: ruby script/generate controller Login add_user login logout index delete_user list_users The controller and views files were created correctly. Any help would be awesome. Thanks, Tony -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rail...
2003 Nov 27
13
Asterisk behind NAT << How to do it.
Thanks to ww and his patch on bug #104, I have successfully implemented Asterisk behind NAT without using STUN or anything crazy. It's quite straight forward. Until this gets tested enough and put into CVS, you will have to patch your chan_sip.c file to do this. I'm sure within the next few days this will get put merged into CVS if no one finds any problems. I tried this on chan_sip.c
2011 May 07
4
Activerecord::JDBCError: Invalid column number
Hi, I''m rather new to Ruby and RoR, so I do not really know whether this ist the right forum to place my question. For my first ''project'' I planned to create a simple online-viewer, which grabs data from an existing database and make them visible in a structured form via browsers. So I thought that could be the right beginner-project, because I have only read datasets
2007 Jan 03
4
prevent "delete user script" to delete special Samba user
Hello, OS: FreeBSD 6.1 Samba: 3.0.23c What kind of exit code do the "delete user script" need, to prevent Samba from deleting a user in tdbsam database? I'm testing Windows "User Manager for Domain" (usrmgr.exe) and I'm trying to convince Samba to NOT delete special users like "administrator" etc. Whenever I delete such a user within User Manager for
2010 Apr 26
2
woriking under webrick but not under passenger
..."index" }) else flash[:notice] = "Invalid user/password combination" end end end def logout session[:user_id] = nil flash[:notice] = "Logged out" redirect_to(:action => "login_page") end def index end def delete_user if request.post? user = User.find(params[:id]) if User.count == 1 flash[:notice] = "You can''t remove last remaining user!" else user.destroy end end redirect_to(:action => :list_users) end def list_users @all_users =...