|
296 |
def create(self): |
296 |
def create(self): |
297 |
'''create object''' |
297 |
'''create object''' |
298 |
|
298 |
|
|
|
299 |
if not univention.admin.modules.supports(self.module, 'add'): |
300 |
raise univention.admin.uexceptions.invalidOperation('add') |
301 |
|
299 |
if self.exists(): |
302 |
if self.exists(): |
300 |
raise univention.admin.uexceptions.objectExists(self.dn) |
303 |
raise univention.admin.uexceptions.objectExists(self.dn) |
301 |
|
304 |
|
|
307 |
def modify(self, modify_childs=1,ignore_license=0): |
310 |
def modify(self, modify_childs=1,ignore_license=0): |
308 |
'''modify object''' |
311 |
'''modify object''' |
309 |
|
312 |
|
|
|
313 |
if not univention.admin.modules.supports(self.module, 'edit'): |
314 |
raise univention.admin.uexceptions.invalidOperation('edit') |
315 |
|
310 |
if not self.exists(): |
316 |
if not self.exists(): |
311 |
raise univention.admin.uexceptions.noObject(self.dn) |
317 |
raise univention.admin.uexceptions.noObject(self.dn) |
312 |
|
318 |
|
Lines 471-476
def move_subelements(self, olddn, newdn, subelements, ignore_license = False):
|
Link Here
|
---|
|
471 |
def remove(self, remove_childs=0): |
477 |
def remove(self, remove_childs=0): |
472 |
'''remove object''' |
478 |
'''remove object''' |
473 |
|
479 |
|
|
|
480 |
if not univention.admin.modules.supports(self.module, 'remove'): |
481 |
raise univention.admin.uexceptions.invalidOperation('remove') |
482 |
|
474 |
if not self.dn or not self.lo.get(self.dn): |
483 |
if not self.dn or not self.lo.get(self.dn): |
475 |
raise univention.admin.uexceptions.noObject(self.dn) |
484 |
raise univention.admin.uexceptions.noObject(self.dn) |
476 |
|
485 |
|