~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-03 22:43:32 UTC
  • mfrom: (14443.3.8 no-team-admin-restrictions)
  • Revision ID: launchpad@pqm.canonical.com-20120103224332-5zi4vcvry7vg9l8h
[r=sinzui][bug=102180,
        206058] Let team admins promote others to admins and change their own
        expiration dates.

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 can also renew any memberships of the team they own.
 
542
Team owners and admins can also renew any memberships of the team they
 
543
own or administer.
543
544
 
544
545
    >>> landscape = getUtility(IPersonSet).getByName(
545
546
    ...     'landscape-developers')
553
554
    True
554
555
    >>> sampleperson_on_landscape.setExpirationDate(tomorrow, sampleperson)
555
556
 
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
 
 
559
557
    >>> cprov_on_buildd = membershipset.getByPersonAndTeam(
560
558
    ...     cprov, buildd_admins)
561
559
    >>> buildd_admins.teamowner.name
562
560
    u'name16'
563
561
    >>> print cprov_on_buildd.status.title
564
562
    Administrator
565
 
 
566
563
    >>> foobar_on_buildd.canChangeExpirationDate(cprov)
567
564
    True
568
565
    >>> foobar_on_buildd.setExpirationDate(tomorrow, cprov)
569
566
 
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
 
 
577
567
 
578
568
Flagging expired memberships
579
569
----------------------------