Allow group owner to admin group.

This commit is contained in:
Ricky Zhou (周家杰) 2007-09-10 10:45:02 -07:00
parent 4c3cdec8e1
commit 71de520f7e

View file

@ -22,8 +22,10 @@ def canAdminGroup(userName, groupName, g=None):
# TODO: Allow the group owner to admin a group.
if not g:
g = Groups.byUserName(userName)
group = Groups.groups(groupName)[groupName]
try:
if isAdmin(userName, g) or \
(group.fedoraGroupOwner == userName) or \
(g[groupName].fedoraRoleType.lower() == 'administrator'):
return True
else: