Lines 45-51
from univention.lib.i18n import Translation
|
Link Here
|
---|
|
45 |
from functools import wraps |
45 |
from functools import wraps |
46 |
import re |
46 |
import re |
47 |
import inspect |
47 |
import inspect |
48 |
from ldap.filter import escape_filter_chars, filter_format |
48 |
from ldap.filter import escape_filter_chars, filter_format, escape_dn_chars |
49 |
|
49 |
|
50 |
from univention.management.console.config import ucr |
50 |
from univention.management.console.config import ucr |
51 |
from univention.management.console.log import MODULE |
51 |
from univention.management.console.log import MODULE |
Lines 232-270
class SchoolSearchBase(object):
|
Link Here
|
---|
|
232 |
|
232 |
|
233 |
@property |
233 |
@property |
234 |
def workgroups(self): |
234 |
def workgroups(self): |
235 |
return "cn=%s,cn=groups,%s" % (self._containerStudents, self.schoolDN) |
235 |
return "cn=%s,cn=groups,%s" % (escape_dn_chars(self._containerStudents), self.schoolDN) |
236 |
|
236 |
|
237 |
@property |
237 |
@property |
238 |
def classes(self): |
238 |
def classes(self): |
239 |
return "cn=%s,cn=%s,cn=groups,%s" % (self._containerClass, self._containerStudents, self.schoolDN) |
239 |
return "cn=%s,cn=%s,cn=groups,%s" % (escape_dn_chars(self._containerClass), escape_dn_chars(self._containerStudents), self.schoolDN) |
240 |
|
240 |
|
241 |
@property |
241 |
@property |
242 |
def rooms(self): |
242 |
def rooms(self): |
243 |
return "cn=%s,cn=groups,%s" % (self._containerRooms, self.schoolDN) |
243 |
return "cn=%s,cn=groups,%s" % (escape_dn_chars(self._containerRooms), self.schoolDN) |
244 |
|
244 |
|
245 |
@property |
245 |
@property |
246 |
def students(self): |
246 |
def students(self): |
247 |
return "cn=%s,cn=users,%s" % (self._containerStudents, self.schoolDN) |
247 |
return "cn=%s,cn=users,%s" % (escape_dn_chars(self._containerStudents), self.schoolDN) |
248 |
|
248 |
|
249 |
@property |
249 |
@property |
250 |
def teachers(self): |
250 |
def teachers(self): |
251 |
return "cn=%s,cn=users,%s" % (self._containerTeachers, self.schoolDN) |
251 |
return "cn=%s,cn=users,%s" % (escape_dn_chars(self._containerTeachers), self.schoolDN) |
252 |
|
252 |
|
253 |
@property |
253 |
@property |
254 |
def teachersAndStaff(self): |
254 |
def teachersAndStaff(self): |
255 |
return "cn=%s,cn=users,%s" % (self._containerTeachersAndStaff, self.schoolDN) |
255 |
return "cn=%s,cn=users,%s" % (escape_dn_chars(self._containerTeachersAndStaff), self.schoolDN) |
256 |
|
256 |
|
257 |
@property |
257 |
@property |
258 |
def staff(self): |
258 |
def staff(self): |
259 |
return "cn=%s,cn=users,%s" % (self._containerStaff, self.schoolDN) |
259 |
return "cn=%s,cn=users,%s" % (escape_dn_chars(self._containerStaff), self.schoolDN) |
260 |
|
260 |
|
261 |
@property |
261 |
@property |
262 |
def admins(self): |
262 |
def admins(self): |
263 |
return "cn=%s,cn=users,%s" % (self._containerAdmins, self.schoolDN) |
263 |
return "cn=%s,cn=users,%s" % (escape_dn_chars(self._containerAdmins), self.schoolDN) |
264 |
|
264 |
|
265 |
@property |
265 |
@property |
266 |
def classShares(self): |
266 |
def classShares(self): |
267 |
return "cn=%s,cn=shares,%s" % (self._containerClass, self.schoolDN) |
267 |
return "cn=%s,cn=shares,%s" % (escape_dn_chars(self._containerClass), self.schoolDN) |
268 |
|
268 |
|
269 |
@property |
269 |
@property |
270 |
def shares(self): |
270 |
def shares(self): |
Lines 280-286
class SchoolSearchBase(object):
|
Link Here
|
---|
|
280 |
|
280 |
|
281 |
@property |
281 |
@property |
282 |
def examUsers(self): |
282 |
def examUsers(self): |
283 |
return "cn=%s,%s" % (self._examUserContainerName, self.schoolDN) |
283 |
return "cn=%s,%s" % (escape_dn_chars(self._examUserContainerName), self.schoolDN) |
284 |
|
284 |
|
285 |
@property |
285 |
@property |
286 |
def globalGroupContainer(self): |
286 |
def globalGroupContainer(self): |
Lines 288-306
class SchoolSearchBase(object):
|
Link Here
|
---|
|
288 |
|
288 |
|
289 |
@property |
289 |
@property |
290 |
def educationalDCGroup(self): |
290 |
def educationalDCGroup(self): |
291 |
return "cn=OU%s-DC-Edukativnetz,cn=ucsschool,cn=groups,%s" % (self.school, self._ldapBase) |
291 |
return "cn=OU%s-DC-Edukativnetz,cn=ucsschool,cn=groups,%s" % (escape_dn_chars(self.school), self._ldapBase) |
292 |
|
292 |
|
293 |
@property |
293 |
@property |
294 |
def educationalMemberGroup(self): |
294 |
def educationalMemberGroup(self): |
295 |
return "cn=OU%s-Member-Edukativnetz,cn=ucsschool,cn=groups,%s" % (self.school, self._ldapBase) |
295 |
return "cn=OU%s-Member-Edukativnetz,cn=ucsschool,cn=groups,%s" % (escape_dn_chars(self.school), self._ldapBase) |
296 |
|
296 |
|
297 |
@property |
297 |
@property |
298 |
def administrativeDCGroup(self): |
298 |
def administrativeDCGroup(self): |
299 |
return "cn=OU%s-DC-Verwaltungsnetz,cn=ucsschool,cn=groups,%s" % (self.school, self._ldapBase) |
299 |
return "cn=OU%s-DC-Verwaltungsnetz,cn=ucsschool,cn=groups,%s" % (escape_dn_chars(self.school), self._ldapBase) |
300 |
|
300 |
|
301 |
@property |
301 |
@property |
302 |
def administrativeMemberGroup(self): |
302 |
def administrativeMemberGroup(self): |
303 |
return "cn=OU%s-Member-Verwaltungsnetz,cn=ucsschool,cn=groups,%s" % (self.school, self._ldapBase) |
303 |
return "cn=OU%s-Member-Verwaltungsnetz,cn=ucsschool,cn=groups,%s" % (escape_dn_chars(self.school), self._ldapBase) |
304 |
|
304 |
|
305 |
@property |
305 |
@property |
306 |
def examGroupName(self): |
306 |
def examGroupName(self): |
Lines 310-316
class SchoolSearchBase(object):
|
Link Here
|
---|
|
310 |
|
310 |
|
311 |
@property |
311 |
@property |
312 |
def examGroup(self): |
312 |
def examGroup(self): |
313 |
return "cn=%s,cn=ucsschool,cn=groups,%s" % (self.examGroupName, self._ldapBase) |
313 |
return "cn=%s,cn=ucsschool,cn=groups,%s" % (escape_dn_chars(self.examGroupName), self._ldapBase) |
314 |
|
314 |
|
315 |
def isWorkgroup(self, groupDN): |
315 |
def isWorkgroup(self, groupDN): |
316 |
# a workgroup cannot lie in a sub directory |
316 |
# a workgroup cannot lie in a sub directory |