-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auth: Use standalone models for invitations
- remove invite hacks from the social pipeline - TODO: rewritten invitation to send invites directly - invitations now work regardless registration open - TODO: project admins can only invite outside users with registration open - improved mail templates for invitations - TODO: user profile view of pending invitations - TODO: user has to accept the invitation to become team member Fixes #9261 Fixes #9131 Fixes #7412
- Loading branch information
Showing
18 changed files
with
382 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright © Michal Čihař <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# Generated by Django 4.2.3 on 2023-07-27 09:06 | ||
|
||
import uuid | ||
|
||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
import weblate.utils.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("weblate_auth", "0027_alter_group_components"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Invitation", | ||
fields=[ | ||
( | ||
"uuid", | ||
models.UUIDField( | ||
default=uuid.uuid4, | ||
editable=False, | ||
primary_key=True, | ||
serialize=False, | ||
), | ||
), | ||
("timestamp", models.DateTimeField(auto_now_add=True)), | ||
( | ||
"email", | ||
weblate.utils.fields.EmailField( | ||
blank=True, max_length=190, verbose_name="E-mail" | ||
), | ||
), | ||
( | ||
"is_superuser", | ||
models.BooleanField( | ||
default=False, | ||
help_text="User has all possible permissions.", | ||
verbose_name="Superuser status", | ||
), | ||
), | ||
( | ||
"group", | ||
models.ForeignKey( | ||
help_text="The user is granted all permissions included in membership of these groups.", | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="weblate_auth.group", | ||
verbose_name="Group", | ||
), | ||
), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
help_text="Please type in an existing Weblate account name or e-mail address.", | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="User to add", | ||
), | ||
), | ||
( | ||
"author", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="created_invitation_set", | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
], | ||
), | ||
] |
Oops, something went wrong.