update_plugins admin check
-
The
current_user_can('update_plugins')(onesignal-admin.php line 74) fails ifdefine(DISALLOW_FILE_MODS', true);is set in wp-config.php thus OneSignal is not available for configuration.See this link why: https://core.trac.wordpress.org/browser/tags/4.5.3/src/wp-includes/capabilities.php#L320 how
update_pluginsis denied withdo_not_allow.To reproduce: add
define(DISALLOW_FILE_MODS', true);to wp-config.php and try to access the OneSignal Dashboard page as an admin.To fix: use a different capability check, like
activate_pluginsormanage_options, which do not have this corner case.https://wordpress.org/plugins/onesignal-free-web-push-notifications/
The topic ‘update_plugins admin check’ is closed to new replies.