Logo Search packages:      
Sourcecode: zope-pas version File versions  Download package

def PluggableAuthService-1.4::plugins::ZODBGroupManager::ZODBGroupManager::removePrincipalFromGroup (   self,
  principal_id,
  group_id 
)

Remove a prinicpal from from a group.

o Return a boolean indicating whether the principal was already 
  a member of the group.

o Raise KeyError if 'group_id' is unknown.

o Ignore requests to remove a principal if not already a member
  of the group.

Definition at line 283 of file ZODBGroupManager.py.

00283                                                                 :

        """ Remove a prinicpal from from a group.

        o Return a boolean indicating whether the principal was already 
          a member of the group.

        o Raise KeyError if 'group_id' is unknown.

        o Ignore requests to remove a principal if not already a member
          of the group.
        """
        group_info = self._groups[ group_id ] # raise KeyError if unknown!

        current = self._principal_groups.get( principal_id, () )
        new = tuple( [ x for x in current if x != group_id ] )
        already = current != new

        if already:
            self._principal_groups[ principal_id ] = new

        return already

    #
    #   ZMI


Generated by  Doxygen 1.6.0   Back to index