;ò
\ÔÐHc           @   sL   d  Z  d k l Z d k Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d S(   sF   
   Copyright (C) 1999-2005 PimenTech SARL (http://www.pimentech.net)

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   This library 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
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  
(   s   PgObjectNs   UserIdc           B   sƒ   t  Z d  Z d Z d Z d Z e i Z e i	 Z
 e d f d d „ Z	 d „  Z d „  Z d	 „  Z e d
 „ Z e d „ Z d „  Z RS(   s_   
	UserId object
	Uses first acl_users folder found by acquisition
	PgObject is the Top class 
	s   UserIds   misc_/OFSP/UserFolder_icon.gifs   userids	   Anonymouss
   postgresqlc         C   s#   | |  _  |  i | | | | ƒ d  S(   N(   s   roless   selfs   _UserId__PgObject_inits   ids   connection_ids   uids   initialized_from(   s   selfs   ids   connection_ids   uids   roless   initialized_from(    (    s	   userid.pys   __init__)   s    	c         C   s   |  i | | ƒ |  i ƒ  d  S(   N(   s   selfs   _UserId__PgObject_MAAs   items	   containers   update(   s   selfs   items	   container(    (    s	   userid.pys   manage_afterAdd-   s    c         C   s’   |  i d ƒ } |  i d ƒ } |  i } |  i d | | f ƒ |  i i | ƒ o  |  i i | | | | d ƒ Sn |  i i	 | | | | d ƒ Sd S(   s    Add a user s   logins   pwds%   Change or add user '%s' with roles %si    N(
   s   selfs   get_row_attrs   logins   pwds   roless   notices	   acl_userss   getUsers   _changeUsers   _addUser(   s   selfs   pwds   logins   roles(    (    s	   userid.pys   set_user1   s     	 c         C   s    |  i i |  i d ƒ f ƒ d S(   s    Remove a user s   loginN(   s   selfs	   acl_userss   acl_users_delUserss   get_row_attr(   s   self(    (    s	   userid.pys   del_user<   s     c         C   s    |  i d ƒ |  _ |  i ƒ  d S(   s    to be implemented s   loginN(   s   selfs   get_row_attrs   titles   set_user(   s   selfs   REQUEST(    (    s	   userid.pys   update@   s     c         C   sŠ   | i } |  |  i } d | d <x( | d i ƒ  D] \ } } | | | <q1 W|  i | ƒ | t
 j	 o | |  _	 n |  i ƒ  |  i ƒ  d S(   s    set new contenti    s
   ref_statuts   useridN(   s   REQUESTs   forms   selfs	   tablenames   rows   itemss   keys   items   commits   roless   Nones   set_users   reindex(   s   selfs   REQUESTs   roless   forms   items   keys   row(    (    s	   userid.pys   modifyE   s     	
 
c         C   sH   |  |  i } d | d <|  i | ƒ d f |  _ |  i ƒ  |  i ƒ  d  S(   Ni   s
   ref_statuts	   Anonymous(   s   selfs	   tablenames   rows   commits   REQUESTs   roless   set_users   reindex(   s   selfs   REQUESTs   row(    (    s	   userid.pys   _suspendS   s    

(   s   __name__s
   __module__s   __doc__s	   meta_types   icons	   tablenames   PgObjects   manage_afterAdds   _UserId__PgObject_MAAs   __init__s   _UserId__PgObject_inits   Nones   set_users   del_users   updates   modifys   _suspend(    (    (    s	   userid.pys   UserId   s    					s   Profilsc           B   s>   t  Z d  Z d Z d Z e d e d „ Z d „  Z d „  Z RS(   s    Update profild for a userid s   profilss   Profilss
   postgresqlc         C   s&   t  i |  | | | | ƒ | |  _ d  S(   N(   s   PgObjects   __init__s   selfs   ids   connection_ids   uids   initialized_froms   profil(   s   selfs   ids   connection_ids   uids   initialized_froms   profil(    (    s	   userid.pys   __init__b   s    c         C   sm   |  i ƒ  |  |  i } | d i ƒ  | d <|  i o t |  i ƒ | d <n t i	 |  | | ƒ |  i ƒ  d S(   s@    Zope method : automaticaly called when an instance is created. s   userids
   ref_userids
   ref_profilN(   s   selfs   _create_current_rows	   tablenames   rows	   containers   getUids   profils   ints   PgObjects   manage_afterAdds   ids   reindex(   s   selfs   ids	   containers   row(    (    s	   userid.pys   manage_afterAddf   s     

c         C   s?   |  |  i } t | i d ƒ | d <|  i | ƒ |  i ƒ  d S(   s    change profils s   profils
   ref_profilN(   s   selfs	   tablenames   rows   ints   REQUESTs   forms   commits   reindex(   s   selfs   REQUESTs   row(    (    s	   userid.pys   modifyq   s
     (	   s   __name__s
   __module__s   __doc__s	   tablenames	   meta_types   Nones   __init__s   manage_afterAdds   modify(    (    (    s	   userid.pys   Profils[   s    	(   s   __doc__s$   Products.PimenTechLibCommon.pgobjects   PgObjects   DateTimes   UserIds   Profils(   s   UserIds   Profilss   PgObjects   DateTime(    (    s	   userid.pys   ?   s   	B
