Issue #593
closedusername key in permissions preventing '.' in username.
Description
Description of problem:
The way mongo handles key/values prevents a key from containing a '.', and in the permissions data structure there is a key/value pair with username as the key. This causes an error during permissions creation when username contains a '.'.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Clone https://github.com/pcreech/pulp.git and switch to branch pcreech-1113629 or use pull request https://github.com/pulp/pulp/pull/1265
2. $ pulp-admin auth user create --login test.user
3. Enter password
4. Re-Enter password
Actual results:
->An internal error occurred on the Pulp server:
->RequestException: POST request
->on /pulp/api/v2/users/ failed with 500 - key 'test.user' must not contain '.'
Expected results:
User [test.user] successfully created
Additional info:
I've narrowed it down to when the user's permissions get created. The user object iself is created successfully in db.users table.
The options I have come up with to handle this so far are:
1. Switch to tying permissions to something other than the login
(this will require existig databases to be modified, and introduces
potential errors on production machines)
2. Find a way to encode the '.' in the username to a different character,
possibly one that's an 'invalid' character in the username so there is no
chance of character overlap.
3. Continue restricting '.' from username
+ This bug was cloned from Bugzilla Bug #1158138 +