class-tp-editor-capabilities.php
function limit_lower_roles( $caps, $cap, $user_id, $args ) {
		if( 'promote_user' == $cap ) {

			if( ! isset( $args[0] ) )
				$caps[] = 'do_not_allow';

			if( $args[0] == $user_id )
				$caps[] = 'do_not_allow';

			$other = new WP_User( absint( $args[0] ) );
			if( $other->has_cap('administrator') && ! current_user_can( 'administrator' ) )
				$caps[] = 'do_not_allow';

		} else if( $cap == 'delete_users' || $cap == 'edit_user' ) {
			if( ! isset( $_GET['user'] ) )
				return $caps;

			$other_id = absint( $_GET['user'] );

			if( ! $other_id )
				return $caps;

			if( $other_id == $user_id )
				return $caps;

			$other = new WP_User( $other_id );
			if( $other->has_cap( 'administrator' ) && ! current_user_can( 'administrator' ) )
				$caps[] = 'do_not_allow';

		}

		return $caps;
	}
function limit_lower_roles( $caps, $cap, $user_id, $args ) {
		if( 'promote_user' == $cap ) {

			if( ! isset( $args[0] ) )
				$caps[] = 'do_not_allow';

			if( $args[0] == $user_id )
				$caps[] = 'do_not_allow';

			$other = new WP_User( absint( $args[0] ) );
			if( $other->has_cap('administrator') && ! current_user_can( 'administrator' ) )
				$caps[] = 'do_not_allow';

		} else if( $cap == 'delete_users' || $cap == 'edit_user' ) {
			if( ! isset( $_GET['user'] ) )
				return $caps;

			$other_id = absint( $_GET['user'] );

			if( ! $other_id )
				return $caps;

			if( $other_id == $user_id )
				return $caps;

			$other = new WP_User( $other_id );
			if( $other->has_cap( 'administrator' ) && ! current_user_can( 'administrator' ) )
				$caps[] = 'do_not_allow';

		}

		return $caps;
	}
Refrain non-admins from editing / promoting / deleting administrators