Module Wiki
module Wiki : sig..end
Author(s): Boris Yakobowski
This file contains all the groups for the wiki component of Ocsimore, a default implemenetation of a Wiki_types.Wiki_rights structure, and a few other misc definitions
val (>>=) : 'a Lwt.t -> ('a -> 'b Lwt.t) -> 'b Lwt.t
val wiki_admin_name : string
Name of the administration wiki. This is the name that must be used when creating (or searching for) this wiki. If that name is changed, the database *must* be upgraded manually to reflect the change
exception No_admin_wiki
val get_admin_wiki : unit -> Wiki_types.wiki_info Lwt.t
val wiki_admin_servpage :
unit ->
(string list, unit, Eliom_service.get_service_kind,
Eliom_service.attached, Eliom_service.service_kind, [ `WithSuffix ],
[ `One of string list ] Eliom_parameter.param_name, unit,
[ `Registrable ], Eliom_registration.appl_service)
Eliom_service.service Lwt.t
val wiki_admin_page_link :
string list -> Eliom_content.Html5.F.Xml.uri Lwt.t
Wiki groups
val prefix : string
val param_wiki : User_sql.Types.find_param
val param_wikibox : User_sql.Types.find_param
val param_wikipage : User_sql.Types.find_param
val aux_grp :
string ->
string ->
User_sql.Types.find_param -> 'a User_sql.Types.parameterized_group
val admin_writer_reader_aux :
name:string ->
descr:string ->
find_param:User_sql.Types.find_param ->
'a User_sql.Types.admin_writer_reader
All wiki-related groups
val wikis_creator : User_sql.Types.user
Groups taking a wiki as argument
val aux_grp_wiki :
string ->
string -> Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_admins : Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wikis_deletor : Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_subwikiboxes_creators :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_wikipages_creators :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_css_creators :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_wikiboxes_creators :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_wikiboxes_deletors :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_wikiboxes_grps :
Wiki_types.wiki_arg User_sql.Types.admin_writer_reader
val wiki_files_readers :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_wikiboxes_src_viewers :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_wikiboxes_oldversion_viewers :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_metadata_editors :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val wiki_files_uploaders :
Wiki_types.wiki_arg User_sql.Types.parameterized_group
val ok :
'a User_sql.Types.parameterized_group ->
User_sql.Types.user ->
User_sql.Types.user ->
'a User_sql.Types.parameterized_group list -> bool Lwt.t
val wikibox_grps :
Wiki_types.wikibox_arg User_sql.Types.admin_writer_reader
The following groups take a wikibox as argument. They are used to override generic wiki permissions.
val can_sthg_wikibox :
User.GenericRights.admin_writer_reader_access ->
Wiki_types.wikibox -> bool Lwt.t
val aux_group :
'a User_sql.Types.parameterized_group ->
'a Opaque.int32_t -> bool Lwt.t
class wiki_rights : (object <<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_create_wiki"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_create_wiki>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|unit <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_admin_wiki"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_admin_wiki>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_delete_wiki"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_delete_wiki>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_edit_metadata"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_edit_metadata>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_set_wiki_permissions"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_set_wiki_permissions>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_admin_wikibox"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_admin_wikibox>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|<<a_api text="Wiki_types.wikibox" | type Wiki_types.wikibox >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_write_wikibox"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_write_wikibox>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|<<a_api text="Wiki_types.wikibox" | type Wiki_types.wikibox >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_read_wikibox"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_read_wikibox>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|<<a_api text="Wiki_types.wikibox" | type Wiki_types.wikibox >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_view_static_files"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_view_static_files>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_upload_files"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_upload_files>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_create_wikipages"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_create_wikipages>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_create_subwikiboxes"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_create_subwikiboxes>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_create_wikiboxes"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_create_wikiboxes>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_delete_wikiboxes"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_delete_wikiboxes>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_create_wikicss"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_create_wikicss>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_create_wikipagecss"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_create_wikipagecss>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|<<a_api text="Wiki_types.wikipage" | type Wiki_types.wikipage >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_set_wikibox_specific_permissions"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_set_wikibox_specific_permissions>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wikibox" | type Wiki_types.wikibox >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_view_oldversions"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_view_oldversions>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|<<a_api text="Wiki_types.wikibox" | type Wiki_types.wikibox >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_view_history"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_view_history>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|<<a_api text="Wiki_types.wikibox" | type Wiki_types.wikibox >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_view_oldversions_src"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_view_oldversions_src>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|<<a_api text="Wiki_types.wikibox" | type Wiki_types.wikibox >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_view_src"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_view_src>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|<<a_api text="Wiki_types.wikibox" | type Wiki_types.wikibox >> <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>><<pre class="ocsforge_color odocwiki_code"| <<span id="METHODcan_admin_wikipage"|<<span class="ocsforge_color_keyword"|method>> <<span class="odocwiki_name"|can_admin_wikipage>>>> <<span class="ocsforge_color_delimiter"|~:>> <<span class="odocwiki_type"|\\ <<a_api text="Wiki_types.wiki_arg" | type Wiki_types.wiki_arg >> <<a_api text="Opaque.int32_t" | type Opaque.int32_t >> * string <<span class="ocsforge_color_delimiter"| -> >> bool <<span class="ocsforge_color_uid"|Lwt>><<span class="ocsforge_color_delimiter"| . >><<span class="ocsforge_color_lid"|t>>>>>>end:object ... end)
val default_container_page : string
A text suitable as the default text for a container page
exception Wiki_already_registered_at_path of (string * string) * string
An exception raised when we register two wikis at the same path. The first two strings are the description of the conflicting wikis, the third string is the path
exception Wiki_with_same_title of Wiki_types.wiki
Same thing with two wikis of the same name. The wiki returned is the id of the existing wiki
val create_wiki :
title:string ->
descr:string ->
?path:Eliom_lib.Url.path ->
?staticdir:string ->
?boxrights:bool ->
author:User_sql.Types.userid ->
?admins:User_sql.Types.user list ->
?readers:User_sql.Types.user list ->
?container_text:string ->
model:Wiki_types.wiki_model -> unit -> Wiki_types.wiki Lwt.t
Creation of a wiki
If the optional argument path is present, the wiki will be bound to the URL represented by path when it is registered.
The argument container_text is the wikicreole code for the container wikibox of the wiki; wiki_css is the css for the wiki.
If boxrights is true (default), it is possible to set the rights on each box individually.
val modified_wikibox :
wikibox:Wiki_types.wikibox ->
boxversion:Int32.t -> Int32.t option Lwt.t
modified_wikibox box version returns Some curversion iff the current version curversion of box is greater than version, None otherwise
val default_bi :
wikibox:Wiki_types.wikibox ->
rights:Wiki_types.wiki_rights -> Wiki_widgets_interface.box_info Lwt.t