Verified Commit e1efdbcf authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add automatic NextCloud group for committee chairs

parent 11fc3db3
......@@ -64,6 +64,12 @@ class NextCloudGroupsView(ListAPIView):
except Board.DoesNotExist:
board_users = []
committee_chair_users = (MemberGroupMembership.active_objects
.filter(group__board=None)
.filter(group__society=None)
.filter(chair=True)
.values_list('member__username', flat=True))
response.data = list(response.data) + [
{
'pk': -1,
......@@ -74,6 +80,11 @@ class NextCloudGroupsView(ListAPIView):
'pk': -2,
'name': 'Board',
'members': board_users
},
{
'pk': -3,
'name': 'Committee Chairs',
'members': committee_chair_users
}
]
return response
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment