From: matitaweb Date: Wed, 19 Oct 2011 15:58:38 +0000 (+0000) Subject: Matitaweb: added a function MatitaAuthentication.get_users returning X-Git-Tag: make_still_working~2171 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=3b88d3315fe9a716d32cc51adb2e2d151cd447e8;p=helm.git Matitaweb: added a function MatitaAuthentication.get_users returning the list of the registered users. --- diff --git a/matitaB/matita/matitaAuthentication.ml b/matitaB/matita/matitaAuthentication.ml index 2d9b377ca..7ae548058 100644 --- a/matitaB/matita/matitaAuthentication.ml +++ b/matitaB/matita/matitaAuthentication.ml @@ -43,6 +43,8 @@ let lookup_user uid = List.assoc uid !user_tbl let user_of_session sid = let res,_,_ = List.assoc sid !session_tbl in res +let get_users () = List.map fst !user_tbl + let create_session uid = let status = new MatitaEngine.status (Some uid) "cic:/matita" in let history = [status] in diff --git a/matitaB/matita/matitaAuthentication.mli b/matitaB/matita/matitaAuthentication.mli index feb139837..ccb0af73f 100644 --- a/matitaB/matita/matitaAuthentication.mli +++ b/matitaB/matita/matitaAuthentication.mli @@ -31,6 +31,8 @@ val lookup_user : string -> (string * session_id option) val user_of_session : session_id -> string +val get_users : unit -> string list + val create_session : string -> session_id val get_session_owner : session_id -> string