Support » Plugin: Gutenberg Ramp » Option to allow only super admins make changes

  • Resolved Dedering

    (@dedering)


    Our multisite contains 1,000+ sites and an equivalent number of admins. It would be helpful if there was an option to restrict Ramp controls to super admins only. This would help us to ensure that no options are enabled without the knowledge of our super admin team.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support David Artiss

    (@dartiss)

    Hi,

    I’ll get this added to the list of suggested features – thanks!

    Meantime, you can add this yourself. If you head to gutenberg-ramp/inc/admin/class-gutenberg-ramp-post-type-settings-ui.php, look for line 15.

    Right now it says…

    if ( ! current_user_can( 'administrator' ) ) {

    I would suggest changing this to…

    if ( ! is_super_admin() ) {

    (I’ve not tried it myself, though, so give it a test first).

    David.

    Plugin Support David Artiss

    (@dartiss)

    Alternatively, if you don’t want to modify the code the following added, say, to your functions.php file will remove the current admin screen and re-add it just for Super Admins…

    remove_action( 'admin_init', 'gutenberg_ramp_initialize_admin_ui' );
    add_action( 'admin_init', 'my_custom_ramp_ui');
    function my_custom_ramp_ui() {
        if ( is_super_admin() ) {
            gutenberg_ramp_initialize_admin_ui();
        }
    }
    • This reply was modified 1 year, 7 months ago by David Artiss.
    Plugin Support David Artiss

    (@dartiss)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Option to allow only super admins make changes’ is closed to new replies.