Roundup Tracker - Issues

Message2178

Author anonymous
Recipients
Date 2006-02-21.05:31:36
Message-id
In-reply-to
Logged In: NO 

I have a roundup instance (roundup-0.8.4) which seems to
have several users registered with the same username.

I have username set as a key on the user class, like:

user = Class(db, "user",
                username=String(),
                password=Password(),
                address=String(),
                realname=String(),
                phone=String(),
                organisation=String(),
                alternate_addresses=String(),
                queries=Multilink('query'),
                roles=String(),     # comma-separated string
of Role names
                timezone=String())
user.setkey("username")

But when I use the following command line command, it shows
some duplicate users :

% roundup-admin -i /home/roundup/trackers/support list user

...
4720: zagar001
4721: zagar001
4722: Rod_Landis
4723: lars
4724: lars
4725: tiner
4726: akibal
4727: akibal
4728: jlesueur
4729: jlesueur
4731: jlesueur
4732: jlesueur
4733: jlesueur
4730: jlesueur
4734: jlesueur
4735: gerda
4736: gerda
4737: elqaya
4738: bdunkel
4739: mary.kalantizs
...

Inspecting the Postgres _user table I see that there is no
unique key requirement of the username field:

roundup=> \d _user
                      Table "public._user"
        Column        |            Type             | Modifiers 
----------------------+-----------------------------+-----------
 _activity            | timestamp without time zone | 
 _actor               | integer                     | 
 _address             | text                        | 
 _alternate_addresses | text                        | 
 _creation            | timestamp without time zone | 
 _creator             | integer                     | 
 _organisation        | text                        | 
 _password            | character varying(255)      | 
 _phone               | text                        | 
 _realname            | text                        | 
 _roles               | text                        | 
 _timezone            | text                        | 
 _username            | text                        | 
 id                   | integer                     | not null
 __retired__          | integer                     | default 0
Indexes:
    "_user_pkey" primary key, btree (id)
    "_user_retired_idx" btree (__retired__)
    "_user_username_idx" btree (_username)

Would you consider enforcing unique keys at the database
level (or at least for all the backends which will support
uniqueness)?

Many thanks for the roundup software!

Gus Gollings
History
Date User Action Args
2009-02-03 14:21:39adminlinkissue1435667 messages
2009-02-03 14:21:39admincreate