forked from matfystutor/web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
svnacl.py
20 lines (17 loc) · 803 Bytes
/
svnacl.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""
Output ACL file for the NFIT SVN repositories
managed by Michael Glad.
Mathias Rav, 2013.
"""
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'mftutor.settings'
from mftutor.tutor.models import *
bookgroupset = {'csrusbog': 'rusbog', 'ifarusbog': 'rusbog', 'matrusbog': 'rusbog', 'sangbog': 'sangbog', 'sol': 'sol', 'tutorbog': 'tutorbog', 'latex': '', 'web': ''}
for k in bookgroupset.keys():
print '# ADMIN: rav'
print '[tutor:/'+bookgroupset[k]+']'
print 'tutor = rw'
print 'rav = rw'
for tu in Tutor.objects.filter(year=2013, groups__handle__exact=k).select_related('profile__user', 'profile'):
print tu.profile.user.email+u' = rw # '+tu.profile.studentnumber+u' '+tu.profile.get_full_name()+u' ('+(u', '.join(g.handle for g in tu.groups.all()))+u')'
print