Hey Guys
Do you have a check for "is this person in this conn. a group owner or just in the group"? or even just a "who is group owner" ?
Thanks
Manda
session = client.getSession()
ec = session.getAdminService().getEventContext()
ec.leaderOfGroups # The groups this user is a "leader" or "owner" of
ec.memberOfGroups # The groups this user is a "member" of
session = client.getSession()
group = session.getAdminService().lookupGroup("name-of-group")
for map in group.copyGroupExperimenterMap(): # The mappings of users in the current group
if map.owner: # The user is an owner or "leader" of the current group
experimenter = map.child # The "child" is an Experimenter instance
print experimenter.name.val
ec = conn.getEventContext()
def isLeader(self, gid=None):
"""
Is the current group (or a specified group) led by the current user?
@return: True if user leads the current group
@rtype: Boolean
"""
Return to Developer Discussion
Users browsing this forum: No registered users and 0 guests