Allow for parent/child grouping

This commit is contained in:
2011-02-18 17:06:47 +00:00
parent d4b142406a
commit 26f0a2121b
4 changed files with 94 additions and 3 deletions

View File

@@ -41,10 +41,10 @@ def group_list(request):
else:
status = None
requestable = False
if group.groupinformation and group.groupinformation.requestable and not group.groupinformation.type == GROUP_TYPE_MANAGED:
requestable = True
else:
requestable = False
if not group.groupinformation.parent or group.groupinformation.parent in request.user.groups.all():
requestable = True
fixed = not group.groupinformation.type == GROUP_TYPE_PERMISSION
pending = group.requests.filter(status=REQUEST_PENDING,user=request.user).count()