package current_web

  1. Overview
  2. Docs
type t

Site configuration settings.

class type raw_resource = object ... end
val allow_all : User.t option -> Role.t -> bool

allow_all grants every role to every user.

val v : ?name:string -> ?authn:(csrf:string -> Uri.t) -> ?secure_cookies:bool -> ?refresh_pipeline:int -> has_role:(User.t option -> Role.t -> bool) -> raw_resource Routes.route list -> t

v ~name ~authn ~has_role routes is a site named name (used for the HTML title, etc) that uses authn to authenticate users and has_role to control what they can do.

  • parameter authn

    A link to a login page.

  • parameter secure_cookies

    Set secure cookie attribute (turn on if public site uses https).

  • parameter refresh_pipeline

    Refresh the pipeline graphs and jobs page each refresh_pipeline seconds. Defaults to never.

OCaml

Innovation. Community. Security.