|
Lines 63-68
s4connector_search = False
Link Here
|
| 63 |
# FIXME: What is the use of the following line? |
63 |
# FIXME: What is the use of the following line? |
| 64 |
# __path__.append("users") |
64 |
# __path__.append("users") |
| 65 |
|
65 |
|
|
|
66 |
|
| 66 |
# manages properties |
67 |
# manages properties |
| 67 |
class base(object): |
68 |
class base(object): |
| 68 |
def __init__(self, co, lo, position, dn='', superordinate = None ): |
69 |
def __init__(self, co, lo, position, dn='', superordinate = None ): |
|
Lines 298-304
class base(object):
Link Here
|
| 298 |
return self.descriptions.keys() |
299 |
return self.descriptions.keys() |
| 299 |
|
300 |
|
| 300 |
def items(self): |
301 |
def items(self): |
| 301 |
|
|
|
| 302 |
# this returns emtpy strings resp. empty lists for attributes not set |
302 |
# this returns emtpy strings resp. empty lists for attributes not set |
| 303 |
r=[] |
303 |
r=[] |
| 304 |
for key in self.keys(): |
304 |
for key in self.keys(): |
|
Lines 455-461
class base(object):
Link Here
|
| 455 |
|
455 |
|
| 456 |
|
456 |
|
| 457 |
class simpleLdap(base): |
457 |
class simpleLdap(base): |
| 458 |
|
|
|
| 459 |
def __init__(self, co, lo, position, dn='', superordinate=None, attributes = [] ): |
458 |
def __init__(self, co, lo, position, dn='', superordinate=None, attributes = [] ): |
| 460 |
global s4connector_present |
459 |
global s4connector_present |
| 461 |
global s4connector_search |
460 |
global s4connector_search |
|
Lines 527-533
class simpleLdap(base):
Link Here
|
| 527 |
def description(self): |
526 |
def description(self): |
| 528 |
if self.dn: |
527 |
if self.dn: |
| 529 |
rdn = self.lo.explodeDn(self.dn)[0] |
528 |
rdn = self.lo.explodeDn(self.dn)[0] |
| 530 |
return rdn[rdn.find('=')+1:] |
529 |
return rdn[rdn.find('=') + 1:] |
| 531 |
else: |
530 |
else: |
| 532 |
return 'none' |
531 |
return 'none' |
| 533 |
|
532 |
|
|
Lines 584-590
class simpleLdap(base):
Link Here
|
| 584 |
ml.append(('objectClass', self.oldattr.get('objectClass', []), self.oldattr.get('objectClass', [])+['univentionPolicyReference'])) |
583 |
ml.append(('objectClass', self.oldattr.get('objectClass', []), self.oldattr.get('objectClass', [])+['univentionPolicyReference'])) |
| 585 |
ml.append(('univentionPolicyReference', self.oldpolicies, self.policies)) |
584 |
ml.append(('univentionPolicyReference', self.oldpolicies, self.policies)) |
| 586 |
|
585 |
|
| 587 |
|
|
|
| 588 |
return ml |
586 |
return ml |
| 589 |
|
587 |
|
| 590 |
def _create(self): |
588 |
def _create(self): |
|
Lines 709-715
class simpleLdap(base):
Link Here
|
| 709 |
self.save() |
707 |
self.save() |
| 710 |
return self.dn |
708 |
return self.dn |
| 711 |
|
709 |
|
| 712 |
#+++# MODIFY #+++# |
710 |
#+++# MODIFY #+++# |
| 713 |
def _modify(self, modify_childs=1, ignore_license=0): |
711 |
def _modify(self, modify_childs=1, ignore_license=0): |
| 714 |
self.exceptions=[] |
712 |
self.exceptions=[] |
| 715 |
|
713 |
|
|
Lines 734-740
class simpleLdap(base):
Link Here
|
| 734 |
# iterate over all properties and call checkLdap() of corresponding syntax |
732 |
# iterate over all properties and call checkLdap() of corresponding syntax |
| 735 |
self._call_checkLdap_on_all_property_syntaxes() |
733 |
self._call_checkLdap_on_all_property_syntaxes() |
| 736 |
|
734 |
|
| 737 |
#+++# MODLIST #+++# |
735 |
#+++# MODLIST #+++# |
| 738 |
ml=self._ldap_modlist() |
736 |
ml=self._ldap_modlist() |
| 739 |
# custom attributes |
737 |
# custom attributes |
| 740 |
m=univention.admin.modules.get(self.module) |
738 |
m=univention.admin.modules.get(self.module) |
|
Lines 771-777
class simpleLdap(base):
Link Here
|
| 771 |
ml.remove(i) |
769 |
ml.remove(i) |
| 772 |
ml.extend( addlist ) |
770 |
ml.extend( addlist ) |
| 773 |
|
771 |
|
| 774 |
|
|
|
| 775 |
else: |
772 |
else: |
| 776 |
if deleteObjectClass == '1' and not self.info.has_key(pname): |
773 |
if deleteObjectClass == '1' and not self.info.has_key(pname): |
| 777 |
# value is empty, should delete objectClass and Values |
774 |
# value is empty, should delete objectClass and Values |
|
Lines 819-825
class simpleLdap(base):
Link Here
|
| 819 |
ml.append( ('objectClass', self.oldattr.get('objectClass'), current_ocs+[prop.objClass]) ) |
816 |
ml.append( ('objectClass', self.oldattr.get('objectClass'), current_ocs+[prop.objClass]) ) |
| 820 |
|
817 |
|
| 821 |
else: |
818 |
else: |
| 822 |
|
|
|
| 823 |
if prop.syntax == 'boolean' and self.info.has_key(prop.name) and self.info[prop.name] == '0': |
819 |
if prop.syntax == 'boolean' and self.info.has_key(prop.name) and self.info[prop.name] == '0': |
| 824 |
# syntax is boolean and value == 0 ==> remove |
820 |
# syntax is boolean and value == 0 ==> remove |
| 825 |
dellist = [] |
821 |
dellist = [] |
|
Lines 1396-1408
class simpleComputer( simpleLdap ):
Link Here
|
| 1396 |
object[ 'host' ] = object[ 'host' ].replace( old_name, new_name ) |
1392 |
object[ 'host' ] = object[ 'host' ].replace( old_name, new_name ) |
| 1397 |
object.modify( ) |
1393 |
object.modify( ) |
| 1398 |
|
1394 |
|
| 1399 |
|
|
|
| 1400 |
def __remove_from_dhcp_object( self, position = None, name = None, oldname = None, mac = None, ip = None ): |
1395 |
def __remove_from_dhcp_object( self, position = None, name = None, oldname = None, mac = None, ip = None ): |
| 1401 |
# if we got the mac addres, then we remove the object |
1396 |
# if we got the mac addres, then we remove the object |
| 1402 |
# if we only got the ip addres, we remove the ip address |
1397 |
# if we only got the ip addres, we remove the ip address |
| 1403 |
|
1398 |
|
| 1404 |
univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'we should remove a dhcp object: position="%s", name="%s", oldname="%s", mac="%s", ip="%s"' % ( position, name, oldname, mac, ip ) ) |
1399 |
univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'we should remove a dhcp object: position="%s", name="%s", oldname="%s", mac="%s", ip="%s"' % ( position, name, oldname, mac, ip ) ) |
| 1405 |
|
1400 |
|
| 1406 |
dn = None |
1401 |
dn = None |
| 1407 |
|
1402 |
|
| 1408 |
tmppos = univention.admin.uldap.position( self.position.getDomain( ) ) |
1403 |
tmppos = univention.admin.uldap.position( self.position.getDomain( ) ) |
|
Lines 1482-1492
class simpleComputer( simpleLdap ):
Link Here
|
| 1482 |
for dn2, attributes2 in self.lo.search(scope='domain', attr=[ 'zoneName' ], filter='(&(relativeDomainName=%s)(objectClass=dNSZone))' % name, unique=0 ): |
1477 |
for dn2, attributes2 in self.lo.search(scope='domain', attr=[ 'zoneName' ], filter='(&(relativeDomainName=%s)(objectClass=dNSZone))' % name, unique=0 ): |
| 1483 |
self.lo.modify( dn, [('pTRRecord', '%s.%s.' % (name, attributes2['zoneName'][0]), '')] ) |
1478 |
self.lo.modify( dn, [('pTRRecord', '%s.%s.' % (name, attributes2['zoneName'][0]), '')] ) |
| 1484 |
|
1479 |
|
| 1485 |
zone = univention.admin.handlers.dns.reverse_zone.object( self.co, self.lo, self.position, zoneDN) |
1480 |
zone = univention.admin.handlers.dns.reverse_zone.object( self.co, self.lo, self.position, zoneDN) |
| 1486 |
zone.open() |
1481 |
zone.open() |
| 1487 |
zone.modify() |
1482 |
zone.modify() |
| 1488 |
|
1483 |
|
| 1489 |
|
|
|
| 1490 |
univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'we should remove a dns reverse object: dnsEntryZoneReverse="%s", name="%s", ip="%s"' % ( dnsEntryZoneReverse, name, ip ) ) |
1484 |
univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'we should remove a dns reverse object: dnsEntryZoneReverse="%s", name="%s", ip="%s"' % ( dnsEntryZoneReverse, name, ip ) ) |
| 1491 |
if dnsEntryZoneReverse: |
1485 |
if dnsEntryZoneReverse: |
| 1492 |
rdn = self.calc_dns_reverse_entry_name( ip, dnsEntryZoneReverse ) |
1486 |
rdn = self.calc_dns_reverse_entry_name( ip, dnsEntryZoneReverse ) |
|
Lines 1632-1639
class simpleComputer( simpleLdap ):
Link Here
|
| 1632 |
for dn, attributes in self.lo.search(base=zoneDN, scope='domain', attr=['pTRRecord'], filter=search_filter): |
1626 |
for dn, attributes in self.lo.search(base=zoneDN, scope='domain', attr=['pTRRecord'], filter=search_filter): |
| 1633 |
self.lo.modify(dn, [('pTRRecord', '', ptrrecord)]) |
1627 |
self.lo.modify(dn, [('pTRRecord', '', ptrrecord)]) |
| 1634 |
|
1628 |
|
| 1635 |
|
|
|
| 1636 |
|
| 1637 |
def __remove_related_ptrrecords(self, zoneDN, ip): |
1629 |
def __remove_related_ptrrecords(self, zoneDN, ip): |
| 1638 |
ptrrecord = '%s.%s.' % (self.info['name'], zoneDN.split('=')[1].split(',')[0]) |
1630 |
ptrrecord = '%s.%s.' % (self.info['name'], zoneDN.split('=')[1].split(',')[0]) |
| 1639 |
ip_split = ip.split('.') |
1631 |
ip_split = ip.split('.') |
|
Lines 1643-1649
class simpleComputer( simpleLdap ):
Link Here
|
| 1643 |
for dn, attributes in self.lo.search(base=zoneDN, scope='domain', attr=['pTRRecord'], filter=search_filter): |
1635 |
for dn, attributes in self.lo.search(base=zoneDN, scope='domain', attr=['pTRRecord'], filter=search_filter): |
| 1644 |
if ptrrecord in attributes['pTRRecord']: |
1636 |
if ptrrecord in attributes['pTRRecord']: |
| 1645 |
self.lo.modify(dn, [('pTRRecord', ptrrecord, '')]) |
1637 |
self.lo.modify(dn, [('pTRRecord', ptrrecord, '')]) |
| 1646 |
|
|
|
| 1647 |
|
1638 |
|
| 1648 |
def check_common_name_length(self): |
1639 |
def check_common_name_length(self): |
| 1649 |
univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'check_common_name_length with self["ip"] = %r and self["dnsEntryZoneForward"] = %r' % (self['ip'], self['dnsEntryZoneForward'], )) |
1640 |
univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'check_common_name_length with self["ip"] = %r and self["dnsEntryZoneForward"] = %r' % (self['ip'], self['dnsEntryZoneForward'], )) |
|
Lines 1767-1773
class simpleComputer( simpleLdap ):
Link Here
|
| 1767 |
else: |
1758 |
else: |
| 1768 |
self.lo.modify( dn, [ ( 'aRecord', '' , ip ) ] ) |
1759 |
self.lo.modify( dn, [ ( 'aRecord', '' , ip ) ] ) |
| 1769 |
|
1760 |
|
| 1770 |
|
|
|
| 1771 |
def __add_dns_alias_object( self, name, dnsForwardZone, dnsAliasZoneContainer, alias ): |
1761 |
def __add_dns_alias_object( self, name, dnsForwardZone, dnsAliasZoneContainer, alias ): |
| 1772 |
univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'add a dns alias object: name="%s", dnsForwardZone="%s", dnsAliasZoneContainer="%s", alias="%s"' % ( name, dnsForwardZone, dnsAliasZoneContainer, alias ) ) |
1762 |
univention.debug.debug( univention.debug.ADMIN, univention.debug.INFO, 'add a dns alias object: name="%s", dnsForwardZone="%s", dnsAliasZoneContainer="%s", alias="%s"' % ( name, dnsForwardZone, dnsAliasZoneContainer, alias ) ) |
| 1773 |
if name and dnsForwardZone and dnsAliasZoneContainer and alias: |
1763 |
if name and dnsForwardZone and dnsAliasZoneContainer and alias: |
|
Lines 1832-1838
class simpleComputer( simpleLdap ):
Link Here
|
| 1832 |
pass |
1822 |
pass |
| 1833 |
|
1823 |
|
| 1834 |
def _ldap_post_modify( self ): |
1824 |
def _ldap_post_modify( self ): |
| 1835 |
|
|
|
| 1836 |
self.__multiip |= len(self['mac']) > 1 or len(self['ip']) > 1 |
1825 |
self.__multiip |= len(self['mac']) > 1 or len(self['ip']) > 1 |
| 1837 |
|
1826 |
|
| 1838 |
for entry in self.__changes[ 'dhcpEntryZone' ][ 'remove' ]: |
1827 |
for entry in self.__changes[ 'dhcpEntryZone' ][ 'remove' ]: |
|
Lines 1886-1892
class simpleComputer( simpleLdap ):
Link Here
|
| 1886 |
else: |
1875 |
else: |
| 1887 |
self.__add_dns_reverse_object( self[ 'name' ], dn, ip ) |
1876 |
self.__add_dns_reverse_object( self[ 'name' ], dn, ip ) |
| 1888 |
|
1877 |
|
| 1889 |
|
|
|
| 1890 |
for entry in self.__changes[ 'dnsEntryZoneAlias' ][ 'remove' ]: |
1878 |
for entry in self.__changes[ 'dnsEntryZoneAlias' ][ 'remove' ]: |
| 1891 |
dnsForwardZone, dnsAliasZoneContainer, alias = entry |
1879 |
dnsForwardZone, dnsAliasZoneContainer, alias = entry |
| 1892 |
if not alias: |
1880 |
if not alias: |
|
Lines 1976-1982
class simpleComputer( simpleLdap ):
Link Here
|
| 1976 |
if not self.info.get('domain', None): |
1964 |
if not self.info.get('domain', None): |
| 1977 |
self.info['domain'] = domain |
1965 |
self.info['domain'] = domain |
| 1978 |
|
1966 |
|
| 1979 |
|
|
|
| 1980 |
def _ldap_modlist( self ): |
1967 |
def _ldap_modlist( self ): |
| 1981 |
self.__changes = { 'mac': {'remove': [ ], 'add': [ ]}, 'ip': {'remove': [ ], 'add': [ ]}, 'name': None, |
1968 |
self.__changes = { 'mac': {'remove': [ ], 'add': [ ]}, 'ip': {'remove': [ ], 'add': [ ]}, 'name': None, |
| 1982 |
'dnsEntryZoneForward': { 'remove': [ ], 'add': [ ] }, |
1969 |
'dnsEntryZoneForward': { 'remove': [ ], 'add': [ ] }, |
|
Lines 2014-2026
class simpleComputer( simpleLdap ):
Link Here
|
| 2014 |
newAaaaRecord = [] |
2001 |
newAaaaRecord = [] |
| 2015 |
if oldAddresses != newAddresses: |
2002 |
if oldAddresses != newAddresses: |
| 2016 |
if oldAddresses: |
2003 |
if oldAddresses: |
| 2017 |
for address in oldAddresses: |
2004 |
for address in oldAddresses: |
| 2018 |
if ':' in address: # IPv6 |
2005 |
if ':' in address: # IPv6 |
| 2019 |
oldAaaaRecord.append(address) |
2006 |
oldAaaaRecord.append(address) |
| 2020 |
else: |
2007 |
else: |
| 2021 |
oldARecord.append(address) |
2008 |
oldARecord.append(address) |
| 2022 |
if newAddresses: |
2009 |
if newAddresses: |
| 2023 |
for address in newAddresses: |
2010 |
for address in newAddresses: |
| 2024 |
if ':' in address: # IPv6 |
2011 |
if ':' in address: # IPv6 |
| 2025 |
newAaaaRecord.append(ipaddr.IPv6Address(address).exploded) |
2012 |
newAaaaRecord.append(ipaddr.IPv6Address(address).exploded) |
| 2026 |
else: |
2013 |
else: |
|
Lines 2060-2078
class simpleComputer( simpleLdap ):
Link Here
|
| 2060 |
continue |
2047 |
continue |
| 2061 |
self.__changes[ 'ip' ][ 'remove' ].append( ipAddress ) |
2048 |
self.__changes[ 'ip' ][ 'remove' ].append( ipAddress ) |
| 2062 |
|
2049 |
|
| 2063 |
|
|
|
| 2064 |
if self.hasChanged( 'name' ): |
2050 |
if self.hasChanged( 'name' ): |
| 2065 |
ml.append( ( 'sn', self.oldattr.get( 'sn', [ None ] )[ 0 ], self[ 'name' ] ) ) |
2051 |
ml.append( ( 'sn', self.oldattr.get( 'sn', [ None ] )[ 0 ], self[ 'name' ] ) ) |
| 2066 |
self.__changes[ 'name' ] = ( self.oldattr.get( 'sn', [ None ] )[ 0 ], self[ 'name' ] ) |
2052 |
self.__changes[ 'name' ] = ( self.oldattr.get( 'sn', [ None ] )[ 0 ], self[ 'name' ] ) |
| 2067 |
|
2053 |
|
| 2068 |
if self.hasChanged('ip') or self.hasChanged('mac'): |
2054 |
if self.hasChanged('ip') or self.hasChanged('mac'): |
| 2069 |
|
|
|
| 2070 |
if len(self.info.get('ip', [])) == 1 and len(self.info.get('mac', [])) == 1 and len(self.info.get('dhcpEntryZone', [])): |
2055 |
if len(self.info.get('ip', [])) == 1 and len(self.info.get('mac', [])) == 1 and len(self.info.get('dhcpEntryZone', [])): |
| 2071 |
# In this special case, we assume the mapping between ip/mac address to be |
2056 |
# In this special case, we assume the mapping between ip/mac address to be |
| 2072 |
# unique. The dhcp entry needs to contain the mac address (as sepcified by |
2057 |
# unique. The dhcp entry needs to contain the mac address (as sepcified by |
| 2073 |
# the ldap search for dhcp entries), the ip address may not correspond to |
2058 |
# the ldap search for dhcp entries), the ip address may not correspond to |
| 2074 |
# the ip address associated with the computer ldap object, but this would |
2059 |
# the ip address associated with the computer ldap object, but this would |
| 2075 |
# be erroneous anyway. We therefore update the dhcp entry to correspond to |
2060 |
# be erroneous anyway. We therefore update the dhcp entry to correspond to |
| 2076 |
# the current ip and mac address. (Bug #20315) |
2061 |
# the current ip and mac address. (Bug #20315) |
| 2077 |
dn, ip, mac = self.__split_dhcp_line( self.info['dhcpEntryZone'][0] ) |
2062 |
dn, ip, mac = self.__split_dhcp_line( self.info['dhcpEntryZone'][0] ) |
| 2078 |
|
2063 |
|
|
Lines 2173-2178
class simpleComputer( simpleLdap ):
Link Here
|
| 2173 |
subnet=ldap.explode_dn(reverseDN, 1)[0].replace('.in-addr.arpa','').split('.') |
2158 |
subnet=ldap.explode_dn(reverseDN, 1)[0].replace('.in-addr.arpa','').split('.') |
| 2174 |
ip=sip.split('.') |
2159 |
ip=sip.split('.') |
| 2175 |
return self.calc_dns_reverse_entry_name_do(4, subnet, ip) |
2160 |
return self.calc_dns_reverse_entry_name_do(4, subnet, ip) |
|
|
2161 |
|
| 2176 |
def calc_dns_reverse_entry_name_do(self, maxLength, zoneNet, ip): |
2162 |
def calc_dns_reverse_entry_name_do(self, maxLength, zoneNet, ip): |
| 2177 |
zoneNet.reverse() |
2163 |
zoneNet.reverse() |
| 2178 |
if not ip[:len(zoneNet)] == zoneNet: |
2164 |
if not ip[:len(zoneNet)] == zoneNet: |
|
Lines 2204-2210
class simpleComputer( simpleLdap ):
Link Here
|
| 2204 |
else: |
2190 |
else: |
| 2205 |
self.__modify_dhcp_object( dn, self[ 'name' ], ip, mac ) |
2191 |
self.__modify_dhcp_object( dn, self[ 'name' ], ip, mac ) |
| 2206 |
|
2192 |
|
| 2207 |
|
|
|
| 2208 |
for entry in self.__changes[ 'dnsEntryZoneForward' ][ 'remove' ]: |
2193 |
for entry in self.__changes[ 'dnsEntryZoneForward' ][ 'remove' ]: |
| 2209 |
dn, ip = self.__split_dns_line( entry ) |
2194 |
dn, ip = self.__split_dns_line( entry ) |
| 2210 |
if not ip and not self.__multiip: |
2195 |
if not ip and not self.__multiip: |
|
Lines 2296-2302
class simpleComputer( simpleLdap ):
Link Here
|
| 2296 |
groupObject = univention.admin.objects.get(univention.admin.modules.get('groups/group'), self.co, self.lo, self.position, group) |
2281 |
groupObject = univention.admin.objects.get(univention.admin.modules.get('groups/group'), self.co, self.lo, self.position, group) |
| 2297 |
groupObject.fast_member_remove( [ self.dn ], self.oldattr.get('uid',[]), ignore_license=1 ) |
2282 |
groupObject.fast_member_remove( [ self.dn ], self.oldattr.get('uid',[]), ignore_license=1 ) |
| 2298 |
|
2283 |
|
| 2299 |
|
|
|
| 2300 |
def __update_groups_after_namechange(self): |
2284 |
def __update_groups_after_namechange(self): |
| 2301 |
oldname = self.oldinfo.get('name') |
2285 |
oldname = self.oldinfo.get('name') |
| 2302 |
newname = self.info.get('name') |
2286 |
newname = self.info.get('name') |
|
Lines 2338-2344
class simpleComputer( simpleLdap ):
Link Here
|
| 2338 |
|
2322 |
|
| 2339 |
self.lo.modify(group, [('uniqueMember', oldUniqueMembers, newUniqueMembers), ('memberUid', oldMemberUids, newMemberUids)]) |
2323 |
self.lo.modify(group, [('uniqueMember', oldUniqueMembers, newUniqueMembers), ('memberUid', oldMemberUids, newMemberUids)]) |
| 2340 |
|
2324 |
|
| 2341 |
|
|
|
| 2342 |
def update_groups(self): |
2325 |
def update_groups(self): |
| 2343 |
if not self.hasChanged('groups') and \ |
2326 |
if not self.hasChanged('groups') and \ |
| 2344 |
not ('oldPrimaryGroupDn' in self.__dict__ and self.oldPrimaryGroupDn) and \ |
2327 |
not ('oldPrimaryGroupDn' in self.__dict__ and self.oldPrimaryGroupDn) and \ |
|
Lines 2382-2388
class simpleComputer( simpleLdap ):
Link Here
|
| 2382 |
groupObject['hosts'].remove(self.dn) |
2365 |
groupObject['hosts'].remove(self.dn) |
| 2383 |
groupObject.modify(ignore_license=1) |
2366 |
groupObject.modify(ignore_license=1) |
| 2384 |
|
2367 |
|
| 2385 |
|
|
|
| 2386 |
def primary_group(self): |
2368 |
def primary_group(self): |
| 2387 |
if not self.hasChanged('primaryGroup'): |
2369 |
if not self.hasChanged('primaryGroup'): |
| 2388 |
return |
2370 |
return |
|
Lines 2560-2567
class simpleComputer( simpleLdap ):
Link Here
|
| 2560 |
if raise_after: |
2542 |
if raise_after: |
| 2561 |
raise raise_after |
2543 |
raise raise_after |
| 2562 |
|
2544 |
|
| 2563 |
class simpleLdapSub(simpleLdap): |
|
|
| 2564 |
|
2545 |
|
|
|
2546 |
class simpleLdapSub(simpleLdap): |
| 2565 |
def __init__(self, co, lo, position, dn='', superordinate=None, attributes = [] ): |
2547 |
def __init__(self, co, lo, position, dn='', superordinate=None, attributes = [] ): |
| 2566 |
base.__init__(self, co, lo, position, dn, superordinate ) |
2548 |
base.__init__(self, co, lo, position, dn, superordinate ) |
| 2567 |
|
2549 |
|
|
Lines 2580-2588
class simpleLdapSub(simpleLdap):
Link Here
|
| 2580 |
if hasattr(self,"_ldap_post_remove"): |
2562 |
if hasattr(self,"_ldap_post_remove"): |
| 2581 |
self._ldap_post_remove() |
2563 |
self._ldap_post_remove() |
| 2582 |
|
2564 |
|
|
|
2565 |
|
| 2583 |
class simplePolicy(simpleLdap): |
2566 |
class simplePolicy(simpleLdap): |
| 2584 |
def __init__(self, co, lo, position, dn='', superordinate=None, attributes = [] ): |
2567 |
def __init__(self, co, lo, position, dn='', superordinate=None, attributes = [] ): |
| 2585 |
|
|
|
| 2586 |
self.resultmode=0 |
2568 |
self.resultmode=0 |
| 2587 |
self.dn=dn |
2569 |
self.dn=dn |
| 2588 |
|
2570 |
|
|
Lines 2765-2771
class simplePolicy(simpleLdap):
Link Here
|
| 2765 |
self.policy_result() |
2747 |
self.policy_result() |
| 2766 |
|
2748 |
|
| 2767 |
if self.polinfo.has_key(key): |
2749 |
if self.polinfo.has_key(key): |
| 2768 |
|
|
|
| 2769 |
if self.polinfo[key] != newvalue or self.polinfo_more[key]['policy'] == self.cloned or ( self.info.has_key( key ) and self.info[ key ] != newvalue ): |
2750 |
if self.polinfo[key] != newvalue or self.polinfo_more[key]['policy'] == self.cloned or ( self.info.has_key( key ) and self.info[ key ] != newvalue ): |
| 2770 |
if self.polinfo_more[key]['fixed'] and self.polinfo_more[key]['policy'] != self.cloned: |
2751 |
if self.polinfo_more[key]['fixed'] and self.polinfo_more[key]['policy'] != self.cloned: |
| 2771 |
raise univention.admin.uexceptions.policyFixedAttribute, key |
2752 |
raise univention.admin.uexceptions.policyFixedAttribute, key |