@automattic/jetpack-components 6.2.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [6.2.1] - 2026-11-06
6
+ ### Fixed
7
+ - Footer: Show the Features link to administrators only.
8
+
5
9
  ## [6.2.0] - 2026-11-04
6
10
  ### Added
7
11
  - Add a SidebarFooter component for actions pinned to the bottom of a sidebar. [#54229]
@@ -2063,6 +2067,7 @@
2063
2067
  ### Changed
2064
2068
  - Update node version requirement to 14.16.1
2065
2069
 
2070
+ [6.2.1]: https://github.com/Automattic/jetpack-components/compare/6.2.0...6.2.1
2066
2071
  [6.2.0]: https://github.com/Automattic/jetpack-components/compare/6.1.1...6.2.0
2067
2072
  [6.1.1]: https://github.com/Automattic/jetpack-components/compare/6.1.0...6.1.1
2068
2073
  [6.1.0]: https://github.com/Automattic/jetpack-components/compare/6.0.0...6.1.0
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { isWpcomPlatformSite, getAdminUrl, getScriptData } from '@automattic/jetpack-script-data';
2
+ import { currentUserCan, isWpcomPlatformSite, getAdminUrl, getScriptData, } from '@automattic/jetpack-script-data';
3
3
  import { __ } from '@wordpress/i18n';
4
4
  import { Stack, Text, Link } from '@wordpress/ui';
5
5
  import clsx from 'clsx';
@@ -17,17 +17,17 @@ const UnstyledJetpackFooter = ({ className, menu, ...otherProps }) => {
17
17
  if (getScriptData()?.myJetpack?.isAvailable === true &&
18
18
  !isWpcomPlatformSite() &&
19
19
  !window?.JetpackNetworkAdminData) {
20
- items = [
21
- {
20
+ // My Jetpack shows the Features tab to admins only.
21
+ if (currentUserCan('manage_options')) {
22
+ items.push({
22
23
  label: __('Features', 'jetpack-components'),
23
24
  href: getAdminUrl('admin.php?page=my-jetpack#/features'),
24
- },
25
- {
26
- label: __('Help', 'jetpack-components'),
27
- href: getAdminUrl('admin.php?page=my-jetpack#/help'),
28
- },
29
- ...items,
30
- ];
25
+ });
26
+ }
27
+ items.push({
28
+ label: __('Help', 'jetpack-components'),
29
+ href: getAdminUrl('admin.php?page=my-jetpack#/help'),
30
+ });
31
31
  }
32
32
  if (menu) {
33
33
  items = [...items, ...menu];
@@ -1,4 +1,9 @@
1
- import { isWpcomPlatformSite, getAdminUrl, getScriptData } from '@automattic/jetpack-script-data';
1
+ import {
2
+ currentUserCan,
3
+ isWpcomPlatformSite,
4
+ getAdminUrl,
5
+ getScriptData,
6
+ } from '@automattic/jetpack-script-data';
2
7
  import { __ } from '@wordpress/i18n';
3
8
  import { Stack, Text, Link } from '@wordpress/ui';
4
9
  import clsx from 'clsx';
@@ -31,17 +36,18 @@ const UnstyledJetpackFooter: FC< JetpackFooterProps > = ( { className, menu, ...
31
36
  ! isWpcomPlatformSite() &&
32
37
  ! window?.JetpackNetworkAdminData
33
38
  ) {
34
- items = [
35
- {
39
+ // My Jetpack shows the Features tab to admins only.
40
+ if ( currentUserCan( 'manage_options' ) ) {
41
+ items.push( {
36
42
  label: __( 'Features', 'jetpack-components' ),
37
43
  href: getAdminUrl( 'admin.php?page=my-jetpack#/features' ),
38
- },
39
- {
40
- label: __( 'Help', 'jetpack-components' ),
41
- href: getAdminUrl( 'admin.php?page=my-jetpack#/help' ),
42
- },
43
- ...items,
44
- ];
44
+ } );
45
+ }
46
+
47
+ items.push( {
48
+ label: __( 'Help', 'jetpack-components' ),
49
+ href: getAdminUrl( 'admin.php?page=my-jetpack#/help' ),
50
+ } );
45
51
  }
46
52
 
47
53
  if ( menu ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "description": "Jetpack Components Package",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/components/#readme",
6
6
  "bugs": {