</dl>
{/if}
+ {if $action == 'add' || $group->groupType > 3}
+ <dl>
+ <dt></dt>
+ <dd>
+ <label><input type="checkbox" id="requireMultifactor" name="requireMultifactor" value="1"{if $requireMultifactor} checked{/if}> {lang}wcf.acp.group.requireMultifactor{/lang}</label>
+
+ <small>{lang}wcf.acp.group.requireMultifactor.description{/lang}</small>
+ </dd>
+ </dl>
+ {/if}
+
{if MODULE_TEAM_PAGE && ($action == 'add' || $group->groupType > 3)}
<dl>
<dt></dt>
DefaultFalseBooleanDatabaseTableColumn::create("hasWebP"),
]),
+ PartialDatabaseTable::create('wcf1_user_group')
+ ->columns([
+ DefaultFalseBooleanDatabaseTableColumn::create('requireMultifactor'),
+ ]),
+
DatabaseTable::create('wcf1_user_multifactor')
->columns([
ObjectIdDatabaseTableColumn::create('setupID'),
*/
protected $allowMention = 0;
+ /**
+ * @var int
+ */
+ protected $requireMultifactor = 0;
+
/**
* @inheritDoc
*/
if (isset($_POST['allowMention'])) {
$this->allowMention = \intval($_POST['allowMention']);
}
+ if (isset($_POST['requireMultifactor'])) {
+ $this->requireMultifactor = \intval($_POST['requireMultifactor']);
+ }
}
/**
'userOnlineMarking' => $this->userOnlineMarking,
'showOnTeamPage' => $this->showOnTeamPage,
'allowMention' => $this->allowMention ? 1 : 0,
+ 'requireMultifactor' => $this->requireMultifactor ? 1 : 0,
]),
'options' => $optionValues,
];
// reset values
$this->groupName = '';
$this->userOnlineMarking = '%s';
- $this->allowMention = $this->priority = $this->showOnTeamPage = 0;
+ $this->requireMultifactor = $this->allowMention = $this->priority = $this->showOnTeamPage = 0;
I18nHandler::getInstance()->reset();
}
'groupIsGuest' => false,
'isBlankForm' => empty($_POST),
'allowMention' => $this->allowMention,
+ 'requireMultifactor' => $this->requireMultifactor,
]);
}
$this->userOnlineMarking = $this->group->userOnlineMarking;
$this->showOnTeamPage = $this->group->showOnTeamPage;
$this->allowMention = $this->group->allowMention;
+ $this->requireMultifactor = $this->group->requireMultifactor;
}
parent::readData();
'userOnlineMarking' => $this->userOnlineMarking,
'showOnTeamPage' => $this->showOnTeamPage,
'allowMention' => $this->allowMention,
+ 'requireMultifactor' => $this->requireMultifactor,
]),
'options' => $optionValues,
]);
* should be shown on the team page, otherwise `0`
* @property-read int $allowMention is `1` if the user group can be mentioned in messages,
* otherwise `0`
+ * @property-read int $requireMultifactor is `1` if group members need to set up multi-factor
+ * authentcation, otherwise `0`
*/
class UserGroup extends DatabaseObject implements ITitledObject
{
<item name="wcf.acp.group.option.user.signature.attachment.allowedExtensions"><![CDATA[Erlaubte Dateiendungen]]></item>
<item name="wcf.acp.group.option.user.signature.attachment.allowedExtensions.description"><![CDATA[Eine Dateiendung pro Zeile]]></item>
<item name="wcf.acp.group.option.user.signature.attachment.maxCount"><![CDATA[Maximale Dateianhänge]]></item>
+ <item name="wcf.acp.group.requireMultifactor"><![CDATA[Mehrfaktor-Authentifizierung erzwingen]]></item>
+ <item name="wcf.acp.group.requireMultifactor.description"><![CDATA[Benutzer, die Mitglied dieser Benutzergruppe sind, können die Mehrfaktor-Authentifizierung nicht deaktivieren und können besonders geschützte Bereiche erst betreten, wenn sie die Mehrfaktor-Authentifizierung eingerichtet haben.]]></item>
</category>
<category name="wcf.acp.index">
<item name="wcf.acp.index.credits"><![CDATA[Über WoltLab Suite™]]></item>
<item name="wcf.acp.group.option.user.signature.attachment.allowedExtensions"><![CDATA[Allowed Attachment File Extensions]]></item>
<item name="wcf.acp.group.option.user.signature.attachment.allowedExtensions.description"><![CDATA[Enter one extension per line.]]></item>
<item name="wcf.acp.group.option.user.signature.attachment.maxCount"><![CDATA[Maximum Attachments]]></item>
+ <item name="wcf.acp.group.requireMultifactor"><![CDATA[Require Multi-factor Authentication]]></item>
+ <item name="wcf.acp.group.requireMultifactor.description"><![CDATA[Users that are members of this user group may not disable multi-factor authentication. They will also be required to set up multi-factor authentication before they may enter protected areas.]]></item>
</category>
<category name="wcf.acp.index">
<item name="wcf.acp.index.credits"><![CDATA[About WoltLab Suite™]]></item>
priority MEDIUMINT(8) NOT NULL DEFAULT 0,
userOnlineMarking VARCHAR(255) NOT NULL DEFAULT '%s',
showOnTeamPage TINYINT(1) NOT NULL DEFAULT 0,
- allowMention TINYINT(1) NOT NULL DEFAULT 0
+ allowMention TINYINT(1) NOT NULL DEFAULT 0,
+ requireMultifactor TINYINT(1) NOT NULL DEFAULT 0
);
DROP TABLE IF EXISTS wcf1_user_group_assignment;