ariana-paris / otwarchive-gcode-issues

Apache License 2.0
0 stars 0 forks source link

User can create multiple identical pseuds #43

Open ariana-paris opened 9 years ago

ariana-paris commented 9 years ago

Original issue 43 created by ariana-paris on 2008-05-03T18:51:50.000Z:

What steps will reproduce the problem?

  1. Register
  2. Create pseud with name identical to default
  3. Create pseud with new name
  4. Create pseud with name identical to pseud in step 3.

What is the expected output? What do you see instead? I would expect to have the names in step 2 and 4 rejected on the basis that it is already in use (by me).

Please use labels and text to provide additional information.

ariana-paris commented 9 years ago

Comment #1 originally posted by ariana-paris on 2008-05-03T20:24:03.000Z:

Started working on it.

ariana-paris commented 9 years ago

Comment #2 originally posted by ariana-paris on 2008-05-03T20:51:51.000Z:

Should be fixed in r122.

I added the method has_pseud?(name) to the User model to check if a user already has a pseud with the given name.

Also added validates_presence_of :name to prevent creation of pseuds without name.

ariana-paris commented 9 years ago

Comment #3 originally posted by ariana-paris on 2008-05-06T23:31:05.000Z:

Attempted to create pseuds same as default and current pseud - code rejects and alerts that 'You already have a pseud with that name.'

ariana-paris commented 9 years ago

Comment #4 originally posted by ariana-paris on 2008-05-12T20:39:34.000Z:

<empty>

ariana-paris commented 9 years ago

Comment #5 originally posted by ariana-paris on 2008-05-17T18:05:03.000Z:

In rev 200. Attempted to create pseuds same as default and alternate pseud. Created new pseud and then attempted to create pseud identical to that one. All were rejected with "You already have a pseud with that name." (plus fun skull and crossbones icon) Setting status to verified. \o/ yay!