Changeset 1111 for pykota/trunk

Show
Ignore:
Timestamp:
07/29/03 11:54:03 (21 years ago)
Author:
jalet
Message:

Added configurable LDAP mail attribute support

Location:
pykota/trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/conf/pykota.conf.sample

    r1105 r1111  
    8787newuser : below 
    8888newgroup : below 
     89# 
     90# LDAP attribute which stores the user's email address 
     91usermail : mail 
    8992 
    9093#  
  • pykota/trunk/docs/pykota.sgml

    r1101 r1111  
    1 <!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ 
    2  
    3   <!entity INSTALLATION system "installation.sgml"> 
     1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> 
    42  <!entity EDPYKOTA system "edpykota.sgml"> 
    53  <!entity REPYKOTA system "repykota.sgml"> 
     
    9896 
    9997$Log$ 
     98Revision 1.7  2003/07/29 09:54:03  jalet 
     99Added configurable LDAP mail attribute support 
     100 
    100101Revision 1.6  2003/07/25 13:10:58  jalet 
    101102Improved documentation 
  • pykota/trunk/NEWS

    r1105 r1111  
    2222PyKota NEWS : 
    2323 
     24    - 1.14beta2 : 
     25     
     26        - An LDAP-specific configuration field was introduced, usermail. 
     27          Use it to specify which LDAP attribute contains a valid email 
     28          address for the user. See sample configuration file for 
     29          details.  
     30         
    2431    - 1.14beta : 
    2532     
  • pykota/trunk/pykota/config.py

    r1105 r1111  
    2121# 
    2222# $Log$ 
     23# Revision 1.35  2003/07/29 09:54:03  jalet 
     24# Added configurable LDAP mail attribute support 
     25# 
    2326# Revision 1.34  2003/07/28 09:11:12  jalet 
    2427# PyKota now tries to add its attributes intelligently in existing LDAP 
     
    236239                        "jobbase", "lastjobbase", \ 
    237240                        "newuser", "newgroup", \ 
     241                        "usermail", \ 
    238242                      ] : 
    239243            ldapinfo[option] = self.getGlobalOption(option).strip() 
  • pykota/trunk/pykota/storages/ldapstorage.py

    r1105 r1111  
    2121# 
    2222# $Log$ 
     23# Revision 1.22  2003/07/29 09:54:03  jalet 
     24# Added configurable LDAP mail attribute support 
     25# 
    2326# Revision 1.21  2003/07/28 09:11:12  jalet 
    2427# PyKota now tries to add its attributes intelligently in existing LDAP 
     
    219222            fields = result[0][1] 
    220223            user.ident = result[0][0] 
     224            user.Email = fields.get(self.info["usermail"]) 
     225            if user.Email is not None : 
     226                user.Email = user.Email[0] 
    221227            user.LimitBy = fields.get("pykotaLimitBy") 
    222228            if user.LimitBy is not None : 
  • pykota/trunk/pykota/version.py

    r1105 r1111  
    2121# 
    2222 
    23 __version__ = "1.14beta_unofficial" 
     23__version__ = "1.14beta2_unofficial" 
    2424 
    2525__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" 
  • pykota/trunk/setup.py

    r1105 r1111  
    2323# 
    2424# $Log$ 
     25# Revision 1.22  2003/07/29 09:54:03  jalet 
     26# Added configurable LDAP mail attribute support 
     27# 
    2528# Revision 1.21  2003/07/28 09:11:12  jalet 
    2629# PyKota now tries to add its attributes intelligently in existing LDAP 
     
    248251        # warns for new LDAP fields     
    249252        if sb.get("storagebackend") == "ldapstorage" :     
     253            usermail = conf.getGlobalOption("usermail", ignore=1) 
    250254            newuser = conf.getGlobalOption("newuser", ignore=1) 
    251255            newgroup = conf.getGlobalOption("newgroup", ignore=1) 
    252             if not (newuser and newgroup) : 
    253                 sys.stderr.write("From version 1.14 on, PyKota LDAP Support needs two additional configuration fields.\n") 
    254                 sys.stderr.write("Please put the 'newuser' and 'newgroup' configuration fields in a [global] section in /etc/pykota/pykota.conf\n") 
     256            if not (usermail and newuser and newgroup) : 
     257                sys.stderr.write("From version 1.14 on, PyKota LDAP Support needs three additional configuration fields.\n") 
     258                sys.stderr.write("Please put the 'usermail', 'newuser' and 'newgroup' configuration fields in a\n[global] section in /etc/pykota/pykota.conf\n") 
    255259                sys.stderr.write("You can look at the conf/pykota.conf.sample file for examples.\n") 
    256260                sys.stderr.write("YOU HAVE TO DO THESE MODIFICATIONS MANUALLY, AND RESTART THE INSTALLATION.\n")