search for: create_user

Displaying 20 results from an estimated 46 matches for "create_user".

2008 Mar 17
4
RSpec''ing model association callbacks
...ed_comments comments = Comment.find_all_by_user_id(self.id) comments.each { |c| c.destroy } end end ----------------- User Spec describe User, " being deleted" do before(:each) do end it "should see deleted his own comments" do user = Factory.create_user() comment_1 = Factory.create_comment(:author => user) comment_2 = Factory.create_comment(:author => user) user.destroy comment_1.should be nil comment_2.should be nil end end ----------------- Factory Module def self.create_user(attributes = {}) default_attrib...
2006 Jul 25
5
webrick server slow or does not connect
hi, In login_controller.rb when I do the fallowing code it works fine before_filter :authorize, :except => :login but I want to do the fallowing when creating the user so the authorization is not checked before_filter :authorize, :except => :login, :except => :create_user but when I do this webrick server appear to be slow or not connected and take lot of time to load? Could someone point me in correct direction? Thanks -- Posted via http://www.ruby-forum.com/.
2007 Oct 02
2
Requires from other modules / requires with aliases
...e_bacula_db, set_bacula_db_password ] } ... service{"bacula-director" : ensure => running, require => [ File["/etc/bacula/bacula-dir.conf"], authorise_bacula_user] } ... postgresql::create_user and postgresql::create_db are defines in the postgresql module. Version of puppet is 0.23.2. I wasn''t sure of the syntax to require postgresql::create_user or create_db directly, so I tried using aliases (as above). These seem to work between resources I''ve defined, but I'...
2007 Sep 23
4
Story Runner, autoincrementing
...As a user I want to create a new topic So that I can dicuss Nick''s Mom }, :type => RailsStory do Scenario "Successfully create a new topic in the ''General'' forum" do Given "a user named", "Jon" do |login| @user = create_user login end Given "a forum named", "General" do |name| @forum = create_forum name puts @forum.id end And "user logged in successfully and was redirect to", "/" do |path| post "/session/create", :login => "Jon...
2007 Dec 11
3
Transactional/Rollback problems
...e. It appears as though the rollbacks are *NOT* occurring on the first description block in a file, but are for the rest. Here is a set of specs that are failing: require File.dirname(__FILE__) + "/../spec_helper" describe "Rollback issue 1" do before :each do create_user end it "should have 1 user" do User.count.should == 1 end end describe "Rollback issue 2" do before :each do create_user end it "should have one user" do User.count.should == 1 end end end escher: rake db:test:prepare (in /Users/...
2004 Feb 19
0
Windbindd restarts and lost uids
...the Samba server 2) client GETPWNAM request for TST+testuser1 to the Samba server 3) client GETPWNAM request for TST+TESTUSER1 to the Samba server 4) client GETPWNAM request for testuser1 to the Samba server 5) client GETPWNAM request for TESTUSER1 to the Samba server 6) client CREATE_USER request for testuser1, which returns success and uses up a uid. 7) Process repeats since the winbindd server still can't authenticate using the AD -- including the CREATE_USER. ---- Now to elaborate: There have been situations where a PC tries to access a Samba share. In this case, the...
2009 Oct 29
1
[PATCH] Enables users to migrate virtual machines between hosts.
...opDomain from removedomain import RemoveDomain from listdomains import ListDomains +from migratedomain import MigrateDomain from createuser import CreateUser import utils import logging -ADD_DOMAIN = 1 -START_DOMAIN = 2 -STOP_DOMAIN = 3 -REMOVE_DOMAIN = 4 -LIST_DOMAINS = 5 -CREATE_USER = 6 +ADD_DOMAIN = 1 +START_DOMAIN = 2 +STOP_DOMAIN = 3 +REMOVE_DOMAIN = 4 +LIST_DOMAINS = 5 +MIGRATE_DOMAIN = 6 +CREATE_USER = 7 class NodeMenuScreen(MenuScreen): def __init__(self): @@ -48,15 +50,17 @@ class NodeMenuScreen(MenuScreen): ("Stop A Virtua...
2009 Sep 13
1
belongs_to + create_* = rails vs. console behavior difference = confused Pepe
...... end The way things need to work is to first create an audit and after the audit is created a user that has access to the audit gets created. This has to work this way and not the other way around. I have been testing my code in the console with the following: audit = Audit.create(...) audit.create_user(...) In all instances ''audit'' ended up being updated correctly with the user ID. However, when I executed a very similar code in my controller I got different results. My original control code: @audit = Audit.new(params[:audit]) ... if @audit.save @audit.create_user(....
2007 Oct 16
10
Scenarios Plugin Pre-Announcement
This is sort of a pre-announcement for a Rails plugin my friend Adam Williams and I are working on. We''re in the process of extracting it from a project we are working on so that it can be generally useful to the Rails community. We are calling it "Scenarios". It is a drop in replacement for Rails fixtures: http://faithfulcode.rubyforge.org/svn/plugins/trunk/scenarios/README
2008 Mar 20
5
sharing story steps
Hi, How can I have a common set of steps that all my stories share? i.e. My stories often start out looking like this: Given a user Joe Given a user Jordan then: Given("a user $username") do |username| @users ||= {} @user_sessions ||= {} @users[username] = create_user(:username => username) @user_sessions[username] = login_as(@users[username]) end I want to share that Given with all my stories. Or is there a better way to do it? Joe
2007 Nov 20
9
Testing Models without fixtures
Hi, I would like to test a sorting method that is in the user model, it''s a class method called search. What I would like to do is create 2 users and load the test database with just those 2 users, so that I can call User.search("john") and it would return those two users. Not sure how to clear the test database and populate it just with these 2 users for that specific
2008 Nov 15
4
data not being saved
I am trying to save data entered in a form and nothing seems to be saving. What do you I have to look at to ensure everything is set-up correctly? I have looked in my database.yml file and all looks good and the database that I am trying to use exist. Thanks, -S -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2006 Dec 24
6
What do you think of this controller spec?
Here''s a controller spec I wrote, it''s for a very simple RESTful controller (well, aren''t all RESTful controllers simple? :) I''ve created a couple spec helper methods to refactor some of the common code...for example, require_login_and_correct_user creates two specifications: one for when the user isn''t logged in, and one when the user is logged in but
2023 Apr 07
2
python module
I am looking for the python-samba module. I would like to add/disable/modify AD accounts using python running on a linux machine. ChatGPT suggested the python-samba module. Sample code as follows: from samba.credentials import Credentials from samba.netcmd.user import create as create_user from samba.netcmd.user import setpassword as set_user_password ... I am running Debuan bullseye and I can import the samba module. But there is no samba.netcmd.user name available. So chatgpt suggested I need a newer version of python-samba. I attempted to pip install it -- and it is not availabl...
2006 Aug 08
4
Creating a child simultaneously with parent via form
Hi there I''ve got a user model and an address model; a user has_many addresses. A user object can be created via an html form which also allows for an initial address to be created. I''ve got a controller method working to save both objects via the form, but I suspect I can achieve this in a more rails-esque manner. Here is my controller method: def signup @user =
2011 Apr 08
3
Ruby on rails migration problem
...rms in views, it is not updating the database for these city_id and profession... ( not changing from null ) if add validation for presence of city_id .. it is giving the error "City id cant be blank." even though i filled it... where as it is working fine with the fields i have added in create_users migration... do i have to change anything else when create new migration in AddDetailstoUsers migration .. other than using rake db:migrate .... Thanks., Sagar -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this g...
2008 Jan 04
2
Nested Routes + Facebook Resources
...=>"new", :controller=>"users"} users POST /users/index {:action=>"index", :controller=>"users"} show_user POST /users/:id/show {:action=>"show", :controller=>"users"} create_user POST /users/create {:action=>"create", :controller=>"users"} edit_user POST /users/:id/edit {:action=>"edit", :controller=>"users"} update_user POST /users/:id/update {:action=>&quo...
2005 May 06
1
idmap_sid_to_uid is not get called?
...DOMAIN\KUKU [2005/05/05 21:21:47, 3, pid=26100] nsswitch/winbindd_user.c:winbindd_getpwnam(124) [26876]: getpwnam kuku [2005/05/05 21:21:47, 3, pid=26100] nsswitch/winbindd_user.c:winbindd_getpwnam(124) [26876]: getpwnam KUKU [2005/05/05 21:21:47, 3, pid=26100] nsswitch/winbindd_acct.c:winbindd_create_user(880) [26876]: create_user: user=>(KUKU), group=>() [2005/05/05 21:21:47, 2, pid=26100] nsswitch/winbindd_acct.c:winbindd_create_user(904) winbindd_create_user: Cannot validate gid for group (nobody) [2005/05/05 21:21:47, 3, pid=26100] nsswitch/winbindd_user.c:winbindd_getpwnam(124) [268...
2004 Jan 19
13
winbind and Solaris 9 with AD
...ent doesn't work samba authentication doesn't work - get the following in winbindd.log: [2004/01/19 10:59:27, 5] nsswitch/winbindd_pam.c:(379) NTLM CRAP authentication for user [DEV]\[test7] returned NT_STATUS_OK (PAM: 0) [2004/01/19 10:59:27, 3] nsswitch/winbindd_acct.c:(875) [ 3551]: create_user: user=>(test7), group=>() [2004/01/19 10:59:27, 5] nsswitch/winbindd_acct.c:(521) wb_getgrnam: Did not find group (nobody) my smb.conf is: workgroup = DEV #workgroup = DEV.ANTS.AD.ANPLC.CO.UK realm = DEV.ANTS.AD.ANPLC.CO.UK security = ADS password server = lonsd010.dev.ants.ad.anplc.co.uk...
2010 Dec 02
8
CanCan issue when being very specific
So I got CanCan and Devise working well. I have two types of users: Admins and Nonadmins. Admins can edit all of Nonadmins profiles. The problem is, every user (either Admin or Nonadmin) belongs to an Account or Organization. Admins should only be able to edit users from their own Account or Organization. I was able to do that too. The problem is, I can''t display the Create New User