Opened 8 years ago
Closed 8 years ago
#39200 closed enhancement (fixed)
Replace `is_super_admin()` check with current_user_can( 'manage_network_options' ) in wp-admin/options.php
Reported by: | sathyapulse | Owned by: | flixos90 |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Role/Capability | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
This is part of the #37616 task. There are 2 is_super_admin() checks in wp-includes/option.php that should be replaced with current_user_can( 'manage_network' ).
See: https://core.trac.wordpress.org/ticket/37616#comment:26
Attachments (3)
Change History (9)
#1
@
8 years ago
- Focuses multisite added
- Keywords has-patch added
- Milestone changed from Awaiting Review to 4.8
- Owner set to flixos90
- Status changed from new to assigned
- Type changed from defect (bug) to enhancement
#2
@
8 years ago
Hi @flixos90,
Thank you for the suggestion. I should have noticed that earlier. I have attached the new patch file which includes the missing curly braces throughout the file. Please let me know if any other changes need to be done in the file. I am happy to do it.
#3
@
8 years ago
- Keywords needs-refresh added
- Status changed from assigned to reviewing
Thanks for the update @sathyapulse.
I think we had a small misunderstanding here, the code format should only be adjusted in lines (or their direct environment) which are changed anyway. In 39200.1.patch you added curly braces throughout the entire file, but this makes the diff unreadable since it's unclear what the actual functional code change was.
Only the one clause that you changed in 39200.patch line 163 should get curly braces, please ignore the other ones. Could you please update the patch? It's probably easiest if you do it based on your initial patch.
Hi @sathyapulse, and thanks for the patch! It looks good so far. One minor thing we could adjust is to add curly braces around the clause in line 163: Since we are changing the line anyway, it's a good habit to adjust this clause to follow the proper coding standards.
Feel free to update your patch accordingly, that would be great! :)