fix: mobile app connection owner bug (#37170)
This commit is contained in:
parent
f50abc724f
commit
1c9b3a58fe
|
@ -89,8 +89,7 @@ export const useJetpackPluginState = () => {
|
||||||
);
|
);
|
||||||
} else if (
|
} else if (
|
||||||
jetpackConnectionData &&
|
jetpackConnectionData &&
|
||||||
jetpackConnectionData?.currentUser?.username !==
|
! jetpackConnectionData?.currentUser?.isMaster
|
||||||
jetpackConnectionData?.connectionOwner
|
|
||||||
) {
|
) {
|
||||||
setPluginState(
|
setPluginState(
|
||||||
JetpackPluginStates.NOT_OWNER_OF_CONNECTION
|
JetpackPluginStates.NOT_OWNER_OF_CONNECTION
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
fixed bug where jetpack connection owner field was assumed to be username when its actually display name
|
|
@ -90,7 +90,7 @@ class GetMobileApp extends Task {
|
||||||
private static function is_current_user_connected() {
|
private static function is_current_user_connected() {
|
||||||
if ( class_exists( '\Automattic\Jetpack\Connection\Manager' ) && method_exists( '\Automattic\Jetpack\Connection\Manager', 'is_user_connected' ) ) {
|
if ( class_exists( '\Automattic\Jetpack\Connection\Manager' ) && method_exists( '\Automattic\Jetpack\Connection\Manager', 'is_user_connected' ) ) {
|
||||||
$connection = new Manager();
|
$connection = new Manager();
|
||||||
return $connection->is_user_connected();
|
return $connection->is_connection_owner();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue