Make WordPress Core

Changeset 12630


Ignore:
Timestamp:
01/07/2010 04:05:53 AM (15 years ago)
Author:
ryan
Message:

Remove certain caps for non super admins when running multisite. see #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r12612 r12630  
    950950        break;
    951951    case 'unfiltered_upload':
    952         if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS == true )
     952        if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS == true && ( !is_multisite() || is_super_admin() )  )
    953953            $caps[] = $cap;
    954954        else
    955955            $caps[] = 'do_not_allow';
     956        break;
     957    case 'unfiltered_html':
     958    case 'update_plugins':
     959    case 'delete_plugins':
     960    case 'install_plugins':
     961    case 'edit_plugins':
     962    case 'update_themes':
     963    case 'install_themes':
     964    case 'edit_themes':
     965        // If multisite these caps are allowed only for super admins.
     966        if ( is_multisite() && !is_super_admin() )
     967            $caps[] = 'do_not_allow';
     968        else
     969            $caps[] = $cap;
    956970        break;
    957971    default:
Note: See TracChangeset for help on using the changeset viewer.