X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Fedit_user.ml;h=38f98b396b6e1e7c744054dcd770350ac1a1abd7;hb=35f3941cfe3d70d720604da0b2c8850ef704a92d;hp=ec5ac3197b7615307e990074497e2a01ae11e0f2;hpb=1f125fd7a6794f352f30de71a3905d5356a07008;p=cocanwiki.git diff --git a/scripts/edit_user.ml b/scripts/edit_user.ml index ec5ac31..38f98b3 100644 --- a/scripts/edit_user.ml +++ b/scripts/edit_user.ml @@ -1,7 +1,22 @@ -(* COCANWIKI scripts. +(* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: edit_user.ml,v 1.2 2004/09/09 09:35:33 rich Exp $ + * $Id: edit_user.ml,v 1.4 2004/09/17 15:24:54 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. *) open Apache @@ -57,6 +72,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ self = let can_edit = q#param_true "can_edit" in let can_manage_users = q#param_true "can_manage_users" in + let can_manage_contacts = q#param_true "can_manage_contacts" in (* Trying to remove manage users permission from self? *) (match can_manage_users, self with @@ -69,9 +85,11 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ self = | _ -> ()); let sth = dbh#prepare_cached "update users set email = ?, - can_edit = ?, can_manage_users = ? + can_edit = ?, can_manage_users = ?, + can_manage_contacts = ? where hostid = ? and id = ?" in sth#execute [email; `Bool can_edit; `Bool can_manage_users; + `Bool can_manage_contacts; `Int hostid; `Int userid]; (* Finish up. *)