Closed Bug 512222 Opened 17 years ago Closed 17 years ago

create_user.pl for 0.3 api broken/missing

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

Other
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: markus.doits, Assigned: telliott)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3pre) Gecko/20090823 Shiretoko/3.5.3pre Build Identifier: a5c52fdebd68 like tests/{load_data,load_data0.5}.pl there should be {create_user,create_user0.5}.pl. this means, first the create_user.pl should be renamed to create_user0.5.pl. i tried to get a running 0.3-version of create_user.pl by comparing to load_data.pl but only got creating a user to work: first changing the admin_prefix: -my $ADMIN_PREFIX = 'user/1'; +my $ADMIN_PREFIX = 'weave/admin'; and the request: #create the user - $req = PUT "$PROTOCOL://$SERVERLOGIN$SERVER/$ADMIN_PREFIX/$username", HTTP::Headers->new('X-Weave-Secret' => $secret); - $req->content('{"password":"' . $password . '"}'); + $req = POST "$PROTOCOL://$SERVERLOGIN$SERVER/$ADMIN_PREFIX", ['function' => 'create', 'user' => $username, 'pass' => $password, 'secret' => $ADMIN_SECRET]; $req->content_type('application/x-www-form-urlencoded'); print "add user: " . $ua->request($req)->content(); (notice $secret is wrong in the header in the 0.5 version, it should be $ADMIN_SECRET - this is wrong in the delete-part of 0.5 version too) but i did not get deleting a user to work, i think that's up to you. regards Reproducible: Always
Good point - we'll need the old script up for the next week or two. It's added back in at create_user0.3.pl
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.