refactor(2meet-data-optimizer): stop registering the sso group in core
- TMDO_Member_Fields no longer registers user/sso; the definition moved unchanged (hash 03543f19) to 2meet-data-optimizer-sso-addon. - missing_integration_addons(): 2meet-hub-core or 2meet-spoke-sso without the SSO AddOn is reported (admin notice + Site Health). - The deprecated-AddOn notice points hub / spoke users to the SSO AddOn. - Sites must activate the SSO AddOn before this ships (PR-041); aeav_only sites without it fall back to orphan-group restore. - Verify: core unit 659 / integration 475, SSO 6, HP 142/49, WC 10/22 green, phpcs clean - PR: PR-040
This commit is contained in:
@@ -39,12 +39,18 @@ class MemberFieldsRegistrationTest extends TestCase {
|
||||
public function test_all_four_groups_are_registered(): void {
|
||||
WPDO_Member_Fields::register_entity_fields();
|
||||
|
||||
foreach ( array( 'membership', 'activity', 'profile', 'sso' ) as $group ) {
|
||||
foreach ( array( 'membership', 'activity', 'profile' ) as $group ) {
|
||||
$fields = WPDO_Entity_Registry::get_group_fields( 'user', $group );
|
||||
$this->assertNotEmpty( $fields, "Group '{$group}' should have registered fields." );
|
||||
}
|
||||
}
|
||||
|
||||
public function test_core_leaves_the_sso_group_to_the_sso_addon(): void {
|
||||
WPDO_Member_Fields::register_entity_fields();
|
||||
|
||||
$this->assertSame( array(), WPDO_Entity_Registry::get_group_fields( 'user', 'sso' ) );
|
||||
}
|
||||
|
||||
public function test_core_registers_no_hp_user_group(): void {
|
||||
WPDO_Member_Fields::register_entity_fields();
|
||||
|
||||
@@ -148,41 +154,6 @@ class MemberFieldsRegistrationTest extends TestCase {
|
||||
$this->assertTrue( (bool) $field['fulltext'] );
|
||||
}
|
||||
|
||||
// ── sso group ────────────────────────────────────────────────────────────
|
||||
|
||||
public function test_sso_group_has_eight_fields(): void {
|
||||
WPDO_Member_Fields::register_entity_fields();
|
||||
$fields = WPDO_Entity_Registry::get_group_fields( 'user', 'sso' );
|
||||
// v3.4.4: known_login_ips registered (was leaking to wp_usermeta via set_entity).
|
||||
$this->assertCount( 8, $fields );
|
||||
$this->assertNotNull( $this->find_field( $fields, 'known_login_ips' ) );
|
||||
}
|
||||
|
||||
public function test_hub_global_user_id_is_searchable(): void {
|
||||
WPDO_Member_Fields::register_entity_fields();
|
||||
$fields = WPDO_Entity_Registry::get_group_fields( 'user', 'sso' );
|
||||
$field = $this->find_field( $fields, 'hub_global_user_id' );
|
||||
|
||||
$this->assertTrue( (bool) $field['searchable'] );
|
||||
}
|
||||
|
||||
public function test_token_expires_at_is_datetime_searchable(): void {
|
||||
WPDO_Member_Fields::register_entity_fields();
|
||||
$fields = WPDO_Entity_Registry::get_group_fields( 'user', 'sso' );
|
||||
$field = $this->find_field( $fields, 'token_expires_at' );
|
||||
|
||||
$this->assertSame( 'datetime', $field['type'] );
|
||||
$this->assertTrue( (bool) $field['searchable'] );
|
||||
}
|
||||
|
||||
public function test_refresh_token_enc_is_textarea(): void {
|
||||
WPDO_Member_Fields::register_entity_fields();
|
||||
$fields = WPDO_Entity_Registry::get_group_fields( 'user', 'sso' );
|
||||
$field = $this->find_field( $fields, 'refresh_token_enc' );
|
||||
|
||||
$this->assertSame( 'textarea', $field['type'] );
|
||||
}
|
||||
|
||||
// ── register() hooks add_action ──────────────────────────────────────────
|
||||
|
||||
public function test_register_hooks_wpdo_register_entity_fields(): void {
|
||||
|
||||
Reference in New Issue
Block a user