|
|
|
@ -18,7 +18,7 @@ import sys
|
|
|
|
|
|
|
|
|
|
from calculate.lib.datavars import VariableError, DataVarsError
|
|
|
|
|
|
|
|
|
|
from calculate.core.server.func import WsdlBase
|
|
|
|
|
from calculate.core.server.func import WsdlBase, CustomButton
|
|
|
|
|
from .unix import Unix, UnixError
|
|
|
|
|
from calculate.ldap.ldap import LdapError
|
|
|
|
|
from calculate.unix.variables.action import Actions
|
|
|
|
@ -88,15 +88,17 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'server.sr_ldap_set',
|
|
|
|
|
'server.sr_unix_set',
|
|
|
|
|
),
|
|
|
|
|
expert=('ld_unix_pw_generate_set',
|
|
|
|
|
expert=('cl_unix_pw_generate_set',
|
|
|
|
|
'cl_unix_remove_set',
|
|
|
|
|
'cl_verbose_set',),
|
|
|
|
|
hide=(),
|
|
|
|
|
custom_buttons=[
|
|
|
|
|
('but0', _("Remove"),
|
|
|
|
|
Unix.Method.Setup,
|
|
|
|
|
"button", None,
|
|
|
|
|
lambda Get: Get('server.sr_unix_set') == 'on'),
|
|
|
|
|
('but1', None, _("Next"), "button_next"),
|
|
|
|
|
CustomButton.run_method(
|
|
|
|
|
Unix.Method.Setup, "but0", _("Remove"),
|
|
|
|
|
CustomButton.Behavior.setvalue(
|
|
|
|
|
'cl_unix_remove_set', 'on'),
|
|
|
|
|
lambda Get: Get('server.sr_unix_set') == 'on'),
|
|
|
|
|
CustomButton.next_button("but1")
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -134,7 +136,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'server.cl_server_name': Unix.service_name,
|
|
|
|
|
'cl_unix_action': Actions.UserAdd,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -193,7 +195,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'server.cl_server_name': Unix.service_name,
|
|
|
|
|
'cl_unix_action': Actions.GroupAdd,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -244,7 +246,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'server.cl_server_name': Unix.service_name,
|
|
|
|
|
'cl_unix_action': Actions.GroupMod,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -266,14 +268,15 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'ur_unix_group_users_del',
|
|
|
|
|
),
|
|
|
|
|
custom_buttons=[
|
|
|
|
|
('but0', _("Back"),
|
|
|
|
|
Unix.Method.GroupShow,
|
|
|
|
|
"button"),
|
|
|
|
|
('but1', _("Delete"),
|
|
|
|
|
Unix.Method.GroupDel,
|
|
|
|
|
"button",),
|
|
|
|
|
('but2', _("Modify"),
|
|
|
|
|
Unix.Method.GroupMod, "button"),
|
|
|
|
|
CustomButton.run_method(
|
|
|
|
|
Unix.Method.GroupShow, 'but0', _("Back")),
|
|
|
|
|
CustomButton.run_method(
|
|
|
|
|
Unix.Method.GroupDel, 'but1', _("Delete"),
|
|
|
|
|
CustomButton.Behavior.linkerror(
|
|
|
|
|
source='ur_unix_group_name_exists',
|
|
|
|
|
target='ur_unix_group_newname')),
|
|
|
|
|
CustomButton.run_method(
|
|
|
|
|
Unix.Method.GroupMod, 'but2', _("Modify")),
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -320,7 +323,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'server.cl_server_name': Unix.service_name,
|
|
|
|
|
'cl_unix_action': Actions.GroupDel,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -367,7 +370,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'server.cl_server_name': Unix.service_name,
|
|
|
|
|
'cl_unix_action': Actions.UserMod,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -393,14 +396,12 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'ur_unix_pw_delete_set',
|
|
|
|
|
),
|
|
|
|
|
custom_buttons=[
|
|
|
|
|
('but0', _("Back"),
|
|
|
|
|
Unix.Method.UserShow,
|
|
|
|
|
"button"),
|
|
|
|
|
('but1', _("Delete"),
|
|
|
|
|
Unix.Method.UserDel,
|
|
|
|
|
"button",),
|
|
|
|
|
('but2', _("Modify"),
|
|
|
|
|
Unix.Method.UserMod, "button"),
|
|
|
|
|
CustomButton.run_method(Unix.Method.UserShow,
|
|
|
|
|
'but0', _("Back")),
|
|
|
|
|
CustomButton.run_method(Unix.Method.UserDel,
|
|
|
|
|
'but1', _("Delete")),
|
|
|
|
|
CustomButton.run_method(Unix.Method.UserMod,
|
|
|
|
|
'but2', _("Modify"))
|
|
|
|
|
],
|
|
|
|
|
next_label=_("Perform")
|
|
|
|
|
),
|
|
|
|
@ -452,7 +453,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'server.cl_server_name': Unix.service_name,
|
|
|
|
|
'cl_unix_action': Actions.UserDel,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -499,7 +500,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'server.cl_server_name': Unix.service_name,
|
|
|
|
|
'cl_unix_action': Actions.Passwd,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -552,7 +553,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'cl_unix_action': Actions.GroupShow,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'core.cl_page_max!': '{ur_unix_group_count}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -574,12 +575,10 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'cl_unix_group_fields',
|
|
|
|
|
),
|
|
|
|
|
custom_buttons=[
|
|
|
|
|
('but0', _("Add Group"),
|
|
|
|
|
Unix.Method.GroupAdd,
|
|
|
|
|
"button_view"),
|
|
|
|
|
('but1', _("Show"),
|
|
|
|
|
Unix.Method.GroupShow,
|
|
|
|
|
"button"),
|
|
|
|
|
CustomButton.open_method(Unix.Method.GroupAdd,
|
|
|
|
|
'but0', _("Add Group")),
|
|
|
|
|
CustomButton.run_method(Unix.Method.GroupShow,
|
|
|
|
|
'but1', _("Show"))
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -618,7 +617,7 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'cl_unix_action': Actions.UserShow,
|
|
|
|
|
'cl_autoupdate_set': 'on',
|
|
|
|
|
'core.cl_page_max!': '{ur_unix_user_count}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_dn!': '{ld_unix_bind_dn}',
|
|
|
|
|
'ldap.cl_ldap_bind_pw!': '{ld_unix_pw}',
|
|
|
|
|
# 'cl_dispatch_conf_default': "usenew"
|
|
|
|
|
},
|
|
|
|
@ -646,12 +645,10 @@ class Wsdl(WsdlBase):
|
|
|
|
|
'cl_unix_user_fields',
|
|
|
|
|
),
|
|
|
|
|
custom_buttons=[
|
|
|
|
|
('but0', _("Add User"),
|
|
|
|
|
Unix.Method.UserAdd,
|
|
|
|
|
"button_view"),
|
|
|
|
|
('but1', _("Show"),
|
|
|
|
|
Unix.Method.UserShow,
|
|
|
|
|
"button"),
|
|
|
|
|
CustomButton.open_method(Unix.Method.UserAdd,
|
|
|
|
|
'but0', _("Add User")),
|
|
|
|
|
CustomButton.run_method(Unix.Method.UserShow,
|
|
|
|
|
'but1', _("Show")),
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|