code: public void checkSchemaUpdateOrGrantRights(String schemaName) {
  
          if (!hasSchemaUpdateOrGrantRights(schemaName)) {
              throw Error.error(ErrorCode.X_42501, schemaName);
          }
      }
docs: Checks if this object can modify schema objects or grant access rights
  to them.