Title: update_plugins admin check
Last modified: September 1, 2016

---

# update_plugins admin check

 *  Resolved [Gennady Kovshenin](https://wordpress.org/support/users/soulseekah/)
 * (@soulseekah)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/update_plugins-admin-check/)
 * The `current_user_can('update_plugins')` (onesignal-admin.php line 74) fails 
   if `define(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](https://core.trac.wordpress.org/browser/tags/4.5.3/src/wp-includes/capabilities.php#L320)
   how `update_plugins` is denied with `do_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_plugins` or `manage_options`,
   which do not have this corner case.
 * [https://wordpress.org/plugins/onesignal-free-web-push-notifications/](https://wordpress.org/plugins/onesignal-free-web-push-notifications/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Gennady Kovshenin](https://wordpress.org/support/users/soulseekah/)
 * (@soulseekah)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/update_plugins-admin-check/#post-7644187)
 * A temporary fix for this problem would be to trigger the menu from the theme’s
   functions.php:
 *     ```
       if ( !current_user_can( current_user_can( 'update_plugins') && current_user_can( 'manage_options' ) )
           add_action( 'admin_menu', array( 'OneSignal_Admin', 'add_admin_page' ) );
       ```
   
 *  Plugin Author [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * (@onesignal)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/update_plugins-admin-check/#post-7644321)
 * Thanks for looking into this Gennady. We’ll attempt to implement your fix in 
   the next release of the WordPress plugin.
 *  Plugin Author [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * (@onesignal)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/update_plugins-admin-check/#post-8345820)
 * Sorry for the delay in getting this out. We’ve finally fixed the issue ([https://github.com/OneSignal/OneSignal-WordPress-Plugin/issues/33#issuecomment-255649523](https://github.com/OneSignal/OneSignal-WordPress-Plugin/issues/33#issuecomment-255649523)).
   We expect the change to be available in an updated version of our plugin within
   the next few days.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘update_plugins admin check’ is closed to new replies.

 * ![](https://ps.w.org/onesignal-free-web-push-notifications/assets/icon.svg?rev
   =3003897)
 * [OneSignal - Web Push Notifications](https://wordpress.org/plugins/onesignal-free-web-push-notifications/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/onesignal-free-web-push-notifications/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/)
 * [Active Topics](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/update_plugins-admin-check/#post-8345820)
 * Status: resolved