|
30 |
# /usr/share/common-licenses/AGPL-3; if not, see |
30 |
# /usr/share/common-licenses/AGPL-3; if not, see |
31 |
# <http://www.gnu.org/licenses/>. |
31 |
# <http://www.gnu.org/licenses/>. |
32 |
|
32 |
|
|
|
33 |
import ldap |
34 |
|
33 |
from univention.admin.layout import Tab, Group |
35 |
from univention.admin.layout import Tab, Group |
34 |
import univention.admin.syntax as udm_syntax |
36 |
import univention.admin.syntax as udm_syntax |
35 |
import univention.admin.filter as udm_filter |
37 |
import univention.admin.filter as udm_filter |
Lines 128-134
def __init__( self, co, lo, position, dn = '', superordinate = None, attributes
|
Link Here
|
---|
|
128 |
simplePolicy.__init__( self, co, lo, position, dn, superordinate, attributes ) |
130 |
simplePolicy.__init__( self, co, lo, position, dn, superordinate, attributes ) |
129 |
|
131 |
|
130 |
def _ldap_pre_create( self ): |
132 |
def _ldap_pre_create( self ): |
131 |
self.dn = '%s=%s,%s' % (mapping.mapName( 'name' ), mapping.mapValue( 'name', self.info[ 'name' ] ), self.position.getDn() ) |
133 |
self.dn = '%s=%s,%s' % (mapping.mapName( 'name' ), ldap.dn.escape_dn_chars(mapping.mapValue( 'name', self.info[ 'name' ] )), self.position.getDn() ) |
132 |
|
134 |
|
133 |
def _ldap_addlist( self ): |
135 |
def _ldap_addlist( self ): |
134 |
return [ ( 'objectClass', [ 'top', 'univentionPolicy', 'umcPolicy' ] ) ] |
136 |
return [ ( 'objectClass', [ 'top', 'univentionPolicy', 'umcPolicy' ] ) ] |