Add TeamSync database and API support
Teams can now have a TeamSync entry in the database, indicating how they are synced via an external group. If found, then the user membership of the team cannot be changed via the API.
This commit is contained in:
parent
d718829f5d
commit
f5a854c189
5 changed files with 131 additions and 13 deletions
|
@ -451,7 +451,7 @@ class User(BaseModel):
|
|||
TagManifest, AccessToken, OAuthAccessToken, BlobUpload,
|
||||
RepositoryNotification, OAuthAuthorizationCode,
|
||||
RepositoryActionCount, TagManifestLabel, Tag,
|
||||
ManifestLabel, BlobUploading} | beta_classes
|
||||
ManifestLabel, BlobUploading, TeamSync} | beta_classes
|
||||
|
||||
delete_instance_filtered(self, User, delete_nullable, skip_transitive_deletes)
|
||||
|
||||
|
@ -526,6 +526,15 @@ class LoginService(BaseModel):
|
|||
name = CharField(unique=True, index=True)
|
||||
|
||||
|
||||
class TeamSync(BaseModel):
|
||||
team = ForeignKeyField(Team)
|
||||
|
||||
transaction_id = CharField()
|
||||
last_updated = DateTimeField(default=datetime.now, index=True)
|
||||
service = ForeignKeyField(LoginService)
|
||||
config = JSONField()
|
||||
|
||||
|
||||
class FederatedLogin(BaseModel):
|
||||
user = QuayUserField(allows_robots=True, index=True)
|
||||
service = ForeignKeyField(LoginService)
|
||||
|
|
Reference in a new issue