Skip to content

Commit a33a625

Browse files
committed
Tree editor!
Started to add a tree editor as an "Advanced" feature, trying to replicate the functions of the Active Directory Users and Computers application.
1 parent 8d686a6 commit a33a625

File tree

18 files changed

+10941
-8
lines changed

18 files changed

+10941
-8
lines changed

samba4_manager/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ def main(global_config, **settings):
1919
config.add_route('editar_grupo_grabar_form','/editar_grupo_grabar')
2020
config.add_route('editar_computadora_mostrar_form','/editar_computadora/{objectguid}')
2121
config.add_route('editar_computadora_grabar_form','/editar_computadora_grabar')
22+
config.add_route('listar_avanzado','/listar_avanzado')
23+
config.add_route('listar_subrama','/listar_subrama/{objectguid}')
2224
config.scan()
2325
return config.make_wsgi_app()

samba4_manager/model.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,26 @@ class GroupForm(Form):
2929
("normal_account","Normal Account")
3030
])
3131

32-
class User(object):
32+
class ADObject(object):
33+
def __init__(self,dist_name=""):
34+
self.dn=dist_name
35+
class User(ADObject):
3336
def __init__(self,accountname="",dist_name=""):
37+
super(User,self).__init__(dist_name)
3438
self.samaccountname=accountname
35-
self.dn=dist_name
3639
self.enabled=True
3740
self.account_type="normal_account"
3841

39-
class Computer(object):
42+
class Computer(ADObject):
4043
def __init(self,accountname="",dist_name=""):
44+
super(Computer,self).__init__(dist_name)
4145
self.samaccountname=accountname
42-
self.dn=dist_name
4346
self.enabled=True
4447
self.account_type="trust_account"
4548

46-
class Group(object):
49+
class Group(ADObject):
4750
def __init(self,accountname="",dist_name=""):
51+
super(Group,self).__init__(dist_name)
4852
self.samaccountname=accountname
49-
self.dn=dist_name
5053
self.enabled=True
5154
self.account_type="normal_account"

0 commit comments

Comments
 (0)