Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSO improvements main PR #35277

Merged
merged 35 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
78267d8
Initial
alshakero Jan 26, 2024
020ecdf
SSO: Implement users table improvements (#35158)
alshakero Jan 26, 2024
b1b8a02
User invitation: Mail the newly added user with WPCom invite (#35234)
renancarvalho Jan 29, 2024
58b0a7c
Invite user message: Fix translation (#35304)
renancarvalho Jan 29, 2024
4943ea7
SSO: Add revoke invite action to users table (#35282)
agrullon95 Jan 29, 2024
a7a6d64
SSO: Apply design feedback to table (#35298)
escapemanuele Jan 29, 2024
814c559
Merge branch 'trunk' into add/sso-improvements
alshakero Jan 29, 2024
a20834a
Merge branch 'trunk' into add/sso-improvements
alshakero Feb 2, 2024
f34f2a6
SSO: Add custom message to new user email (#35395)
agrullon95 Feb 5, 2024
6420ce8
Merge branch 'trunk' into add/sso-improvements
alshakero Feb 5, 2024
c630aa4
SSO: Fix user invitation logic (#35473)
agrullon95 Feb 7, 2024
6ad10b8
SSO: Automatically revoke invited users upon deletion (#35475)
alshakero Feb 7, 2024
0b82771
Merge branch 'trunk' into add/sso-improvements
heavyweight Feb 7, 2024
2053bd0
Encode email
escapemanuele Feb 7, 2024
3ac0001
SSO: Persist user-new locale and custom message user-new.php form fi…
agrullon95 Feb 8, 2024
da2ca6a
Merge branch 'trunk' into add/sso-improvements
agrullon95 Feb 8, 2024
3dcb679
Cleanup unused locale
heavyweight Feb 9, 2024
1ed8a69
SSO: Users page, change column text and add tooltip (#35572)
renancarvalho Feb 9, 2024
c798ec9
Merge branch 'trunk' into add/sso-improvements
escapemanuele Feb 12, 2024
eb087f8
SSO/Improve row readability: Add icon and rename row item (#35573)
renancarvalho Feb 12, 2024
2841aee
SSO: Move user related customisation to separate file (#35617)
heavyweight Feb 13, 2024
7af8f14
SSO: Improve question mark icon (#35682)
renancarvalho Feb 14, 2024
2b27d92
Invite: Change param name (#35684)
escapemanuele Feb 14, 2024
c9b1e07
Merge branch 'trunk' into add/sso-improvements
agrullon95 Feb 14, 2024
ac4aba7
SSO: Update users table sso background colors (#35685)
agrullon95 Feb 14, 2024
3eaeca4
Add caching for invites (#35675)
heavyweight Feb 15, 2024
aeff384
Rename changelog
heavyweight Feb 15, 2024
3f9bec7
Discard changes to readme.md
heavyweight Feb 15, 2024
e73fd96
Remove unnecessary return
heavyweight Feb 15, 2024
62fa5b0
Merge branch 'add/sso-improvements' of github.com:Automattic/jetpack …
heavyweight Feb 15, 2024
d389728
Move clear_wpcom_profile_cookies to sso helpers
heavyweight Feb 15, 2024
e32343d
Minor comment fix
heavyweight Feb 15, 2024
43d5566
Add custom message missing translation
heavyweight Feb 15, 2024
099a44f
Merge branch 'trunk' into add/sso-improvements
heavyweight Feb 16, 2024
70aab6a
Switch to gray sso icon background
heavyweight Feb 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/Add column tooltip
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Rename status column to sso status and add tooltip
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/Improve column
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Improve column by renaming and adding icon
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/Improve question mark icon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Replace question mark icon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: enhancement

Added custom message textarea to send a message via email when adding new users
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/add-sso-cached-invites
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Add caching for user invites
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Move user customization to seperate file
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: enhancement

SSO: Add user invite revoke row action in users table
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Trigger user invitation for new users
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-translations
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Fix message translation content
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: enhancement

SSO: improve messaging and account binding between local and wp.com users
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/improve_invite_form
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: enhancement

SSO: When creating a new users, mail the users with an invitation to WPCom.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/revoke-deleted-users
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

SSO: revoke invites sent to users upon users deletion
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-improve-users-table
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: enhancement

SSO: Updated column heading and row background color when invitation is pending.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Persist user-new.php custom message form field after submission with errors
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Update users table ssorow background colors
65 changes: 0 additions & 65 deletions projects/plugins/jetpack/class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Assets\Logo as Jetpack_Logo;
use Automattic\Jetpack\Boost_Speed_Score\Speed_Score;
use Automattic\Jetpack\Config;
use Automattic\Jetpack\Connection\Client;
Expand Down Expand Up @@ -3363,11 +3362,6 @@ public function admin_init() {
// Artificially throw errors in certain specific cases during plugin activation.
add_action( 'activate_plugin', array( $this, 'throw_error_on_activate_plugin' ) );
}

// Add custom column in wp-admin/users.php to show whether user is linked.
add_filter( 'manage_users_columns', array( $this, 'jetpack_icon_user_connected' ) );
add_action( 'manage_users_custom_column', array( $this, 'jetpack_show_user_connected_icon' ), 10, 3 );
add_action( 'admin_print_styles', array( $this, 'jetpack_user_col_style' ) );
}

/**
Expand Down Expand Up @@ -6410,65 +6404,6 @@ public function get_user_option_meta_box_order_dashboard( $sorted ) {

return $sorted;
}

/**
* Adds a "blank" column in the user admin table to display indication of user connection.
*
* @param array $columns User list table columns.
*
* @return array
*/
public function jetpack_icon_user_connected( $columns ) {
$columns['user_jetpack'] = '';
return $columns;
}

/**
* Show Jetpack icon if the user is linked.
*
* @param string $val HTML for the icon.
* @param string $col User list table column.
* @param int $user_id User ID.
*
* @return string
*/
public function jetpack_show_user_connected_icon( $val, $col, $user_id ) {
if ( 'user_jetpack' === $col && self::connection()->is_user_connected( $user_id ) ) {
$jetpack_logo = new Jetpack_Logo();
$emblem_html = sprintf(
'<a title="%1$s" class="jp-emblem-user-admin">%2$s</a>',
esc_attr__( 'This user is linked and ready to fly with Jetpack.', 'jetpack' ),
$jetpack_logo->get_jp_emblem()
);
return $emblem_html;
}

return $val;
}

/**
* Style the Jetpack user column
*/
public function jetpack_user_col_style() {
global $current_screen;
if ( ! empty( $current_screen->base ) && 'users' === $current_screen->base ) {
?>
<style>
.fixed .column-user_jetpack {
width: 21px;
}
.jp-emblem-user-admin svg {
width: 20px;
height: 20px;
}
.jp-emblem-user-admin path {
fill: #069e08;
}
</style>
<?php
}
}

/**
* Checks if Akismet is active and working.
*
Expand Down
Loading
Loading