Changeset 8757 for main


Ignore:
Timestamp:
19 Jun 2012, 07:28:08 (13 years ago)
Author:
Henrik Bettermann
Message:

Add public_name to IKofaPrincipalInfo and IKofaPrincipal.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/authentication.py

    r8756 r8757  
    7777
    7878    A Kofa principal info is created with id, login, title, description,
    79     phone, email and user_type.
     79    phone, email, public_name and user_type.
    8080    """
    8181    grok.implements(IKofaPrincipalInfo)
    8282
    83     def __init__(self, id, title, description, email, phone, user_type):
     83    def __init__(self, id, title, description, email, phone, public_name, user_type):
    8484        self.id = id
    8585        self.title = title
     
    8787        self.email = email
    8888        self.phone = phone
     89        self.public_name = public_name
    8990        self.user_type = user_type
    9091        self.credentialsPlugin = None
     
    9495    """A portal principal.
    9596
    96     Kofa principals provide an extra `email`, `phone` and `user_type`
     97    Kofa principals provide an extra `email`, `phone`, `public_name` and `user_type`
    9798    attribute extending ordinary principals.
    9899    """
     
    101102
    102103    def __init__(self, id, title=u'', description=u'', email=u'',
    103                  phone=None, user_type=u'', prefix=None):
     104                 phone=None, public_name=u'', user_type=u'', prefix=None):
    104105        self.id = id
    105106        if prefix is not None:
     
    110111        self.email = email
    111112        self.phone = phone
     113        self.public_name = public_name
    112114        self.user_type = user_type
    113115
     
    137139            self.info.email,
    138140            self.info.phone,
     141            self.info.public_name,
    139142            self.info.user_type,
    140143            authentication.prefix,
     
    237240            email=account.email,
    238241            phone=account.phone,
     242            public_name=account.public_name,
    239243            user_type=u'user')
    240244
     
    249253            email=account.email,
    250254            phone=account.phone,
     255            public_name=account.public_name,
    251256            user_type=u'user')
    252257
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r8756 r8757  
    392392    email = Attribute("The email address of a user")
    393393    phone = Attribute("The phone number of a user")
     394    public_name = Attribute("The public name of a user")
    394395
    395396
     
    410411        description = u'',
    411412        required=False,)
     413
     414    public_name = schema.TextLine(
     415        title = _(u'Public Name'),
     416        required = False,)
    412417
    413418class IUserAccount(IKofaObject):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/authentication.py

    r8756 r8757  
    140140                             email=account.email,
    141141                             phone=account.phone,
     142                             public_name=account.public_name,
    142143                             user_type=account.user_type)
    143144
  • main/waeup.kofa/trunk/src/waeup/kofa/userscontainer.py

    r8739 r8757  
    3333
    3434    def addUser(self, name, password, title=None,
    35                 description=None, email=None, phone=None, roles=[]):
     35                description=None, email=None, phone=None,
     36                public_name= None, roles=[]):
    3637        """Add a new Account instance, created from parameters.
    3738        """
     
    4142        #    description = title
    4243        self[name] = Account(name=name, password=password, title=title,
    43                              description=description,
     44                             description=description, public_name=public_name,
    4445                             email=email, phone=phone, roles=roles)
    4546        #self.logger.info('User account %s added.' % name)
Note: See TracChangeset for help on using the changeset viewer.