~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/doc/teammembership.txt

  • Committer: William Grant
  • Date: 2012-01-03 07:30:21 UTC
  • mto: This revision was merged to the branch mainline in revision 14621.
  • Revision ID: william.grant@canonical.com-20120103073021-qvprj6kbnpg0h1qv
Update a few templates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
539
539
    AssertionError: ...
540
540
    >>> foobar_on_buildd.setExpirationDate(tomorrow, foobar)
541
541
 
542
 
Team owners and admins can also renew any memberships of the team they
543
 
own or administer.
 
542
Team owners can also renew any memberships of the team they own.
544
543
 
545
544
    >>> landscape = getUtility(IPersonSet).getByName(
546
545
    ...     'landscape-developers')
554
553
    True
555
554
    >>> sampleperson_on_landscape.setExpirationDate(tomorrow, sampleperson)
556
555
 
 
556
In the case of a mere team admin, though, he can only change the expiry
 
557
date of other's memberships, not his own.
 
558
 
557
559
    >>> cprov_on_buildd = membershipset.getByPersonAndTeam(
558
560
    ...     cprov, buildd_admins)
559
561
    >>> buildd_admins.teamowner.name
560
562
    u'name16'
561
563
    >>> print cprov_on_buildd.status.title
562
564
    Administrator
 
565
 
563
566
    >>> foobar_on_buildd.canChangeExpirationDate(cprov)
564
567
    True
565
568
    >>> foobar_on_buildd.setExpirationDate(tomorrow, cprov)
566
569
 
 
570
    >>> cprov_on_buildd.canChangeExpirationDate(cprov)
 
571
    False
 
572
    >>> cprov_on_buildd.setExpirationDate(tomorrow, cprov)
 
573
    Traceback (most recent call last):
 
574
    ...
 
575
    AssertionError: ...
 
576
 
567
577
 
568
578
Flagging expired memberships
569
579
----------------------------