taxonomy-switcher icon indicating copy to clipboard operation
taxonomy-switcher copied to clipboard

Consider syncing capability checks

Open tw2113 opened this issue 5 years ago • 1 comments

We check for manage_options for the admin screen, but install_plugins for the actual action of running the switching.

Perhaps make install_plugins the requirement to even see the admin screen?

Original issue: https://wordpress.org/support/topic/does-not-respect-capabilities-canyou-please-fix-asap/#post-12748575

tw2113 avatar Apr 29 '20 04:04 tw2113

  • manage_options is used for the management menu page: https://github.com/WebDevStudios/taxonomy-switcher/blob/52b0fea30aeab17dee1ba063a5d412f565f88277/Taxonomy_Switcher_UI.php#L87
  • install_plugins is used for running the conversion: https://github.com/WebDevStudios/taxonomy-switcher/blob/52b0fea30aeab17dee1ba063a5d412f565f88277/taxonomy-switcher.php#L51

I suggest manage_options should be the capability used for both.

sc0ttkclark avatar Apr 30 '20 18:04 sc0ttkclark