<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
..shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType name="PersonName"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>
st1\:*{behavior:url(#default#ieooui) }
</STYLE>
<![endif]-->
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0mm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0mm;
        mso-margin-bottom-alt:auto;
        margin-left:0mm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=FR vLink=purple link=blue bgColor=white>
<DIV><FONT face=Verdana size=2>Bonjour JF,</FONT></DIV>
<DIV><FONT face=Verdana size=2>Pour l'affectation du rôle à ton utilisateur, il
suffit de passer par sa fiche dans l'annuaire. Chaque membre a un champ "roles"
dans lequel sont définis ses rôles.</FONT></DIV>
<DIV><FONT face=Verdana size=2>Pour les groupes, c'est un peu plus complexe. Si
tu souhaites déléguer des droits à des groupes d'utilisateurs sur les
directories, il va falloir passer dans la ZMI sur le directory en question et
ajouter un EntryLocalRole du type</FONT></DIV>
<DIV><FONT face=Verdana size=2> - "DroitsGroupe" : "python:
'monGroupe' in getUserEntry().get('roles', [])"</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Ensuite, tu affectes le "DroitsGroupe" à "ACL:
Entry create roles".</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Cordialement</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>PS: N'oublies pas de laisser la liste en
copie</FONT></DIV>
<DIV>
<HR>
<FONT style="FONT-SIZE: 9px; COLOR: #00adce; FONT-FAMILY: Verdana"><FONT
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #0c4da2">Cédric
Marfil</FONT><BR>Concepteur Réalisateur Intégrateur Confirmé<BR><B>Tél.
direct:</B> 03.20.65.34.82<BR><B>Mail:</B>
cedric.marfil@capgemini.com<BR><BR><FONT
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #0c4da2">Cap</FONT><FONT
style="FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #00adce">gemini</FONT><BR>181
rue Jules Delcenserie<BR>59700 Marcq en Baroeul<BR></FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=przydatek@free.fr href="mailto:przydatek@free.fr">Przydatek JF</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=cmarfil@capgemini.fr
href="mailto:cmarfil@capgemini.fr">'Cedric Marfil'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, September 29, 2006 6:02
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [CPS-users-fr] création d'un
groupe dans un script</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Un grand merci, je
vais enfin pouvoir dormir (3 jours et 2 nuits dessus, mais pas forcément
inutile).<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Mais je plus te
lâcher </SPAN></FONT><FONT face=Wingdings color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Wingdings">J</SPAN></FONT><FONT
face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Donc, si je veux
déléguer le droit de création (groupes et utilisateurs) à quelqu’un d’autre
que admin :<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
Je crée un rôle : monrole (là je vois)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
J’ajoute mon_role dans entry create roles de portal_directories.group (mais
aussi de member ?) (là je vois aussi)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
J’affecte mon_role à un utilisateur ou à un groupe (là je ne vois pas comment
et surtout où le faire ?).<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">En tout cas, ta
réponse fonctionnelle me permet d’être sur de pouvoir automatiser l’entée des
groupes et des utilisateurs (dans un établissement scolaire), un nouvel
utilisateur et j’espère développeur de CPS vient de
naître.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Cordialement
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">De :</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">
cps-users-fr-bounces@lists.nuxeo.com
[mailto:cps-users-fr-bounces@lists.nuxeo.com] <B><SPAN
style="FONT-WEIGHT: bold">De la part de</SPAN></B> Cedric Marfil<BR><B><SPAN
style="FONT-WEIGHT: bold">Envoyé :</SPAN></B> vendredi 29 septembre 2006
17:15<BR><B><SPAN style="FONT-WEIGHT: bold">À :</SPAN></B> Przydatek JF;
<st1:PersonName w:st="on" ProductID="Liste Diffusion CPS">Liste Diffusion
CPS</st1:PersonName><BR><B><SPAN
style="FONT-WEIGHT: bold">Objet :</SPAN></B> Re: [CPS-users-fr] création
d'un groupe dans un script</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<P class=MsoNormal><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Bonjour,</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Pour créer une entrée dans un
annuaire, il faut utiliser l'annuaire lui-même et avoir les droits pour le
faire. Donc si dans <st1:PersonName w:st="on" ProductID="la ZMI">la
ZMI</st1:PersonName>, sur portal_directories.groups, les droits de création
(ACL: entry create roles) sont positionnés sur un rôle qui est détenu par
l'utilisateur qui exécute ton script, tu peux
faire:</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">context.portal_directories.groups.createEntry({'group':
'monGroupe', 'members': []})</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face=Verdana size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana">Cordialement</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Verdana color=#0c4da2 size=1><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 7.5pt; COLOR: #0c4da2; FONT-FAMILY: Verdana">Cédric
Marfil</SPAN></FONT></B><FONT face=Verdana color=#00adce size=1><SPAN
style="FONT-SIZE: 7pt; COLOR: #00adce; FONT-FAMILY: Verdana"><BR>Concepteur
Réalisateur Intégrateur Confirmé<BR><B><SPAN style="FONT-WEIGHT: bold">Tél.
direct:</SPAN></B> 03.20.65.34.82<BR><B><SPAN
style="FONT-WEIGHT: bold">Mail:</SPAN></B>
cedric.marfil@capgemini.com<BR><BR></SPAN></FONT><B><FONT face=Verdana
color=#0c4da2 size=1><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 7.5pt; COLOR: #0c4da2; FONT-FAMILY: Verdana">Cap</SPAN></FONT></B><B><FONT
face=Verdana color=#00adce size=1><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 7.5pt; COLOR: #00adce; FONT-FAMILY: Verdana">gemini</SPAN></FONT></B><FONT
face=Verdana color=#00adce size=1><SPAN
style="FONT-SIZE: 7pt; COLOR: #00adce; FONT-FAMILY: Verdana"><BR>181 rue Jules
Delcenserie<BR>59700 Marcq en Baroeul</SPAN></FONT><o:p></o:p></P></DIV>
<BLOCKQUOTE
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0mm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0mm; MARGIN: 5pt 0mm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0mm; BORDER-BOTTOM: medium none">
<DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">----- Original Message -----
<o:p></o:p></SPAN></FONT></P></DIV>
<DIV style="font-color: black">
<P class=MsoNormal style="BACKGROUND: #e4e4e4"><B><FONT face=Arial
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">From:</SPAN></FONT></B><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <A
title=przydatek@free.fr href="mailto:przydatek@free.fr">Przydatek JF</A>
<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><B><FONT face=Arial size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">To:</SPAN></FONT></B><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <A
title=cps-users-fr@lists.nuxeo.com
href="mailto:cps-users-fr@lists.nuxeo.com">Liste Diffusion CPS</A>
<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><B><FONT face=Arial size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">Sent:</SPAN></FONT></B><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> Friday,
September 29, 2006 5:04 PM<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><B><FONT face=Arial size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Arial">Subject:</SPAN></FONT></B><FONT
face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
[CPS-users-fr] création d'un groupe dans un
script<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Bonjour,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Je débute dans CPS (et dans ZOPE
aussi).<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Je voudrais créer un groupe dans
un script. Je n’arrive pas à trouver la
méthode.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">J’avais le même problème avec un
utilisateur, j’ai enfin trouvé le comment :
context.portal_registration.addMember('azerty','azerty').<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Je subodore l’utilisation
de : aadGroup, mais comment ?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Quelqu’un peut-il
m’aider ?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Merci<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">PS : CPS version
3.4.2<o:p></o:p></SPAN></FONT></P>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">_______________________________________________<BR>cps-users-fr
<BR>Adresse de la liste : <st1:PersonName
w:st="on">cps-users-fr@lists.nuxeo.com</st1:PersonName><BR>Gestion de
l'abonnement :
<http://lists.nuxeo.com/mailman/listinfo/cps-users-fr><o:p></o:p></SPAN></FONT></P></BLOCKQUOTE></DIV>
<TABLE>
<TBODY>
<TR>
<TD bgColor=#ffffff><FONT color=#000000>This message contains
information that may be privileged or confidential and is the property
of the Capgemini Group. It is intended only for the person to whom it is
addressed. If you are not the intended recipient, you are not authorized
to read, print, retain, copy, disseminate, distribute, or use this
message or any part thereof. If you receive this message in error,
please notify the sender immediately and delete all copies of this
message.<BR><BR></FONT></TD></TR></TBODY></TABLE></BLOCKQUOTE></BODY></HTML>
<table><tr><td bgcolor=#ffffff><font color=#000000>This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.<br>
<br>
</font></td></tr></table>