Allow group owner to admin group.
This commit is contained in:
parent
4c3cdec8e1
commit
71de520f7e
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue