-
-
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.
feat(auth): add option to enforce second factor authentication
- projects can define this and it will block users from editing - teams can define this and roles from the teams will not be applied unless user is 2fa verified - TODO: middleware warns user about not meeting this requirement - TODO: tests - TODO: documentation Fixes #11341
- Loading branch information
Showing
7 changed files
with
118 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright © Michal Čihař <michal@weblate.org> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# Generated by Django 5.0.7 on 2024-08-05 14:06 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("weblate_auth", "0005_invitation_full_name_invitation_username"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="group", | ||
name="enforced_2fa", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="Requires users to have configured two factor authentication.", | ||
verbose_name="Enforced two factor authentication", | ||
), | ||
), | ||
] |
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,25 @@ | ||
# Copyright © Michal Čihař <michal@weblate.org> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# Generated by Django 5.0.7 on 2024-08-05 14:06 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("trans", "0021_component_processed_revision"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="project", | ||
name="enforced_2fa", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="Requires contributors to have configured two factor authentication before being able to contribute.", | ||
verbose_name="Enforced two factor authentication", | ||
), | ||
), | ||
] |
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