Module User_data

module User_data : sig..end

Author(s): Piero Furiesi, Jaap Boender, Vincent Balat, Boris Yakobowski


val valid_username : string -> bool
val valid_emailaddr : string -> bool
val generate_password : unit -> bytes

User creation

type user_creation = {
  non_admin_can_create: bool;  mail_from: string;  mail_addr: string;  mail_subject: string;  new_user_groups: User_sql.Types.user list;}

Options for the creation of a new user

val can_create_user : options:user_creation -> bool Lwt.t
val can_create_group : unit -> bool Lwt.t
val can_admin_users : unit -> bool Lwt.t
val create_group : 
  name:string -> descr:string -> User_sql.Types.userid Lwt.t

Change user information

val can_view_users : unit -> bool Lwt.t
val can_view_groups : unit -> bool Lwt.t
val can_view_roles : unit -> bool Lwt.t
val can_change_user_data_by_userid : User_sql.Types.userid -> bool Lwt.t
val can_change_user_data_by_user : User_sql.Types.user -> bool Lwt.t
val change_user_data : 
  userid:User_sql.Types.userid ->
  pwd:string * string -> fullname:string -> email:string ->