Table for server-side configuration settings. Will be used to store location of...
[cocanwiki.git] / scripts / page.ml
index 3ff3e01..03c3537 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: page.ml,v 1.16 2004/09/20 17:18:26 rich Exp $
+ * $Id: page.ml,v 1.17 2004/09/22 10:19:26 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -60,6 +60,8 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {edit_anon=edit_anon} user =
   let can_edit = can_edit edit_anon user in
   let can_manage_users = can_manage_users user in
   let can_manage_contacts = can_manage_contacts user in
+  let can_manage_site = can_manage_site user in
+  let can_edit_global_css = can_edit_global_css user in
 
   (* This code generates ordinary pages. *)
   let make_page title description pageid last_modified_date has_page_css
@@ -87,6 +89,8 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {edit_anon=edit_anon} user =
     t#conditional "can_edit" can_edit;
     t#conditional "can_manage_users" can_manage_users;
     t#conditional "can_manage_contacts" can_manage_contacts;
+    t#conditional "can_manage_site" can_manage_site;
+    t#conditional "can_edit_global_css" can_edit_global_css;
 
     (* Pull out the sections in this page. *)
     let sth = dbh#prepare_cached
@@ -163,6 +167,8 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid {edit_anon=edit_anon} user =
     t#conditional "can_edit" can_edit;
     t#conditional "can_manage_users" can_manage_users;
     t#conditional "can_manage_contacts" can_manage_contacts;
+    t#conditional "can_manage_site" can_manage_site;
+    t#conditional "can_edit_global_css" can_edit_global_css;
 
     q#template t
   in