anchor.diff:        await _checkServiceAccountAllowed(agent, package, newVersion);
         return;
       }
  +
       _logger.info('User ${agent.agentId} (${agent.displayId}) '
           'is not an uploader for package ${package.name}, rolling transaction back.');
       throw AuthorizationException.userCannotUploadNewVersion(
  
positive.code:     final sw = Stopwatch()..start();
      final newVersion = entities.packageVersion;
      final currentDartSdk = await getDartSdkVersion();
  
      // query admin notification emails before the transaction starts
      final existingPackage = await lookupPackage(newVersion.package);
      List<String> uploaderEmails;
      if (existingPackage == null) {
        if (agent is AuthenticatedUser) {
          uploaderEmails = [agent.email!];
        } else {
          throw PackageRejectedException.onlyUsersAreAllowedToUploadNewPackages();
        }
      } else {
        uploaderEmails =
  
negative.code:     ]);
    }
  
    /// Throws a [ResponseException] if [agent] is **not** authorized to upload package.
    ///
    /// If [package] is null, this is an attempt to publish a new package, not a new version to an existing package.
    /// If [package] is not null, this is an attempt to publish [newVersion] of existing package.
    Future<void> _requireUploadAuthorization(
        AuthenticatedAgent agent, Package? package, String newVersion) async {
      // new package
      if (package == null) {
        if (agent is AuthenticatedUser) {
          return;
        }
        throw PackageRejectedException.onlyUsersAreAllowedToUploadNewPackages();
      }
  
      // existing package
      if (package.isNotVisible) {
        throw PackageRejectedException.isBlocked();
      }
      if (agent is AuthenticatedUser &&
          await packageBackend.isPackageAdmin(package, agent.user.userId)) {
        return;
  