Support » Plugin: OneSignal - Web Push Notifications » Mulsite site-by-site network installation

  • Resolved josimarcsilva

    (@josimarcsilva)


    Hi,

    I installed the plugin in a mulsite network and did not activate the network. I’m installing site by site. Users with an administrator profile can activate the plugin but they are not viewing the settings menu in the backend.

    The “OneSignal Push” settings menu only appears for super admin.

    I would like the administrators of my network to be allowed to access the plugin’s settings in the “OneSignal Push” menu.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I was able to solve it like this:

    In onesignal-utils.php I change the function:

     public static function is_admin_user() {
        // Only administrators are allowed to do this, see:
        //   https://codex.wordpress.org/Roles_and_Capabilities#delete_users
             return current_user_can('delete_users');
    
      }

    for

     public static function is_admin_user() {
        // Only administrators are allowed to do this, see:
        //   https://codex.wordpress.org/Roles_and_Capabilities#delete_users
    	return current_user_can('activate_plugins');
      }

    In a multisite network the “delete_users” capability is only allowed for super admin.

    I believe that ‘activate_plugins’ is the best option. If the user can activate a plugin then it can also change their settings …

    Thank you for providing your solution!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mulsite site-by-site network installation’ is closed to new replies.