Stats: send install_plugins in the widget's current-user capabilities
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 86/100
Research direction
Read projects/packages/stats-admin/src/class-odyssey-config-data.php, especially Odyssey_Config_Data::get_current_user_capabilities(). Add install_plugins to the capabilities array alongside activate_plugins; done when the returned capabilities include both so the widget can gate installation and activation separately. The payload names no test, so first inspect nearby tests for this method.
Written by the indexing model from the issue text.
Description
Odyssey_Config_Data::get_current_user_capabilities() (projects/packages/stats-admin/src/class-odyssey-config-data.php) sends activate_plugins but not install_plugins.
The dashboard Stats widget gates its Akismet "Install" button on activate_plugins (Automattic/wp-calypso#115529), which is the wrong capability for installing: when DISALLOW_FILE_MODS is set or file_mod_allowed returns false, core maps install_plugins to do_not_allow and leaves activate_plugins untouched, so an administrator on such a site still sees "Install" and the request fails.
Add install_plugins to the capabilities array so the widget can gate "Install" on it and keep "Activate" on activate_plugins.
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 906
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 793
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/jetpack
-
Bug Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/jetpack#54575 ·
Maintainers usually reply within 1 day
-
[Package] My Jetpack [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/jetpack#54189 ·
Maintainers usually reply within 1 day
-
Bug Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/jetpack#53467 ·
Maintainers usually reply within 1 day
-
Brute_Force_Protection: two deprecated static wrappers throw Error on PHP 8 (self:: to non-static methods)Possibly taken @Valley-15 claimed this 63 days ago. OpenBug Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Automattic/jetpack#51728 ·
Maintainers usually reply within 1 day
-
Bug Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Automattic/jetpack#51662 ·
Maintainers usually reply within 1 day
All issues in Automattic/jetpack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 3 days
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
[Sync EN] Formatting improvements to "Large Objects (LOBs)" docs (#6056)Possibly taken A pull request linked to this issue is open or already merged. Opensync-en
Difficulty 1/5 Under an hour Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Перевод устарел
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
repo:cms
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
craftcms/cms#20613 · 1 comment ·
Maintainers usually reply within 1 day