code: func InstallHandlers(r *router.Router, base router.MiddlewareChain, adminAuth auth.Method) {
  	tmpl := &templates.Bundle{
  		Loader:          templates.AssetsLoader(assets.Assets()),
  		DefaultTemplate: "base",
  		FuncMap: template.FuncMap{
  			"includeCSS": func(name string) template.CSS { return template.CSS(assets.GetAsset(name)) },
  			"includeJS":  func(name string) template.JS { return template.JS(assets.GetAsset(name)) },
  		},
  		DefaultArgs: func(c context.Context, e *templates.Extra) (templates.Args, error) {
  			logoutURL, err := auth.LogoutURL(c, "/")
  			if err != nil {
  				return nil, err
  			}
  			return templates.Args{
  				"Email":     auth.CurrentUser(c).Email,
  				"LogoutURL": logoutURL,
  			}, nil
  		},
  	}
  
  	adminDB := adminBypassDB{
  		authdb.ErroringDB{
  			Error: errors.New("admin: unexpected call to authdb.DB on admin page"),
  		},
  	}
  
  	rr := r.Subrouter("/admin/portal")
  	rr.Use(base.Extend(
  		templates.WithTemplates(tmpl),
  		adminDB.install,
  		auth.Authenticate(adminAuth),
  		adminAutologin,
  	))
  
  	rr.GET("", router.MiddlewareChain{}, indexPage)
  	rr.GET("/:PageKey", router.MiddlewareChain{}, portalPageGET)
  	rr.POST("/:PageKey", router.NewMiddlewareChain(xsrf.WithTokenCheck), portalPagePOST)
  	rr.POST("/:PageKey/:ActionID", router.NewMiddlewareChain(xsrf.WithTokenCheck), portalActionPOST)
  }
docs: // InstallHandlers installs HTTP handlers that implement admin UI.
  //
  // `adminAuth` is the method that will be used to authenticate the access
  // (regardless of what's installed in the base context). It must be able to
  // distinguish admins (aka superusers) from non-admins. It is needed because
  // settings UI must be usable even before auth system is configured.