code: func New() logdog.AdminServer {
  	return &logdog.DecoratedAdmin{
  		Service: &server{},
  		Prelude: func(c context.Context, methodName string, req proto.Message) (context.Context, error) {
  			if err := coordinator.IsAdminUser(c); err != nil {
  				log.WithError(err).Warningf(c, "User is not an administrator.")
  
  				// If we're on development server, any user can access this endpoint.
  				if info.IsDevAppServer(c) {
  					log.Infof(c, "On development server, allowing admin access.")
  					return c, nil
  				}
  
  				u := auth.CurrentUser(c)
  				if u == nil || !u.Superuser {
  					return nil, grpcutil.PermissionDenied
  				}
  
  				log.Fields{
  					"email":    u.Email,
  					"clientID": u.ClientID,
  					"name":     u.Name,
  				}.Infof(c, "User is an AppEngine superuser. Granting access.")
  			}
  
  			return c, nil
  		},
  	}
  }
docs: // New instantiates a new AdminServer instance.