Skip to content

Allow enforcing 2fa for super adminns#6

Merged
shadyvb merged 2 commits into
masterfrom
allow-enforcing-2fa-on-super-admin-role
Feb 14, 2022
Merged

Allow enforcing 2fa for super adminns#6
shadyvb merged 2 commits into
masterfrom
allow-enforcing-2fa-on-super-admin-role

Conversation

@shadyvb
Copy link
Copy Markdown

@shadyvb shadyvb commented Feb 14, 2022

@shadyvb shadyvb requested a review from roborourke February 14, 2022 15:39
Copy link
Copy Markdown

@roborourke roborourke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the suggestion this looks good to me

Comment thread class.two-factor-force.php Outdated
public static function global_force_2fa_by_role_field() {
$forced_roles = self::get_forced_user_roles();
$is_universally_forced = self::get_universally_forced_option();
$roles = array_merge( [ 'super-admin' => [ 'name' => 'Super Administrator' ] ], get_editable_roles() );
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be translatable? There's a core string for 'Super Admin' so I'd use that I think.

Suggested change
$roles = array_merge( [ 'super-admin' => [ 'name' => 'Super Administrator' ] ], get_editable_roles() );
$roles = array_merge( [ 'super-admin' => [ 'name' => __( 'Super Admin' ) ] ], get_editable_roles() );

@shadyvb shadyvb merged commit 92f9ce5 into master Feb 14, 2022
@shadyvb shadyvb deleted the allow-enforcing-2fa-on-super-admin-role branch February 14, 2022 16:18
kadamwhite added a commit that referenced this pull request Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants