Add support for temp usernames and an interstitial to confirm username
When a user now logs in for the first time for any external auth (LDAP, JWT, Keystone, Github, Google, Dex), they will be presented with a confirmation screen that affords them the opportunity to change their Quay-assigned username. Addresses most of the user issues around #74
This commit is contained in:
parent
840ea4e768
commit
1e3b354201
18 changed files with 388 additions and 24 deletions
|
@ -372,6 +372,22 @@ class User(BaseModel):
|
|||
Namespace = User.alias()
|
||||
|
||||
|
||||
class UserPromptKind(BaseModel):
|
||||
name = CharField(index=True)
|
||||
|
||||
|
||||
class UserPrompt(BaseModel):
|
||||
user = QuayUserField(allows_robots=False, index=True)
|
||||
kind = ForeignKeyField(UserPromptKind)
|
||||
|
||||
class Meta:
|
||||
database = db
|
||||
read_slaves = (read_slave,)
|
||||
indexes = (
|
||||
(('user', 'kind'), True),
|
||||
)
|
||||
|
||||
|
||||
class TeamRole(BaseModel):
|
||||
name = CharField(index=True)
|
||||
|
||||
|
|
Reference in a new issue