feat(2fa): Added 2fa option. Fixes: RCCE-65

This commit is contained in:
Serhii Ilin 2024-04-15 12:13:03 +03:00
parent 31e3c38a18
commit 9678665ecd
16 changed files with 722 additions and 6 deletions

View file

@ -183,6 +183,14 @@ class RhodeCodeAuthPlugin(RhodeCodeAuthPluginBase):
class RhodeCodeSettingsSchema(AuthnPluginSettingsSchemaBase):
global_2fa = colander.SchemaNode(
colander.Bool(),
default=False,
description=_('Force all users to use two factor authentication by enabling this.'),
missing=False,
title=_('Global 2FA'),
widget='bool',
)
auth_restriction_choices = [
(RhodeCodeAuthPlugin.AUTH_RESTRICTION_NONE, 'All users'),