Browse Source

Изменены параметры usermod и groupmod, добавлена переменная cl_unix_gruop_default

legacy27
parent
commit
3407a04463
  1. 2
      pym/unix/variables/groups.py
  2. 15
      pym/unix/variables/users.py
  3. 6
      pym/unix/wsdl_unix.py

2
pym/unix/variables/groups.py

@ -261,6 +261,7 @@ class VariableUrUnixGroupUsersAdd(UnixUserHelper, Variable):
"""
type = "choiceedit-list"
opt = ("-a", "--add")
guitype = "hidden"
value = []
metavalue = "USERS"
@ -336,6 +337,7 @@ class VariableUrUnixGroupUsersDel(UnixUserHelper, Variable):
"""
type = "choiceedit-list"
opt = ("-r", "--remove")
guitype = "hidden"
value = []
metavalue = "USERS"

15
pym/unix/variables/users.py

@ -185,6 +185,13 @@ class VariableUrUnixHomePathMove(Variable):
_("Previous home directory %s not found") % old_path)
class VariableClUnixGroupDefault(Variable):
"""
Основная группа пользователя по умолчанию
"""
value = "domain"
class VariableUrUnixPrimaryGroup(ExistsUserHelper, UnixGroupHelper,
UnixActionHelper, Variable):
"""
@ -195,7 +202,9 @@ class VariableUrUnixPrimaryGroup(ExistsUserHelper, UnixGroupHelper,
opt = ('-g', '--gid')
metavalue = "GROUP"
domain_group = "domain"
@property
def domain_group(self):
return self.Get('cl_unix_group_default')
def init(self):
self.label = _("Primary group")
@ -203,7 +212,7 @@ class VariableUrUnixPrimaryGroup(ExistsUserHelper, UnixGroupHelper,
"('default' value for create default group)")
def get_new(self):
return "domain"
return self.domain_group
def get_exists(self):
value = str(ExistsUserHelper.get_exists(self))
@ -332,6 +341,7 @@ class VariableUrUnixGroupsAdd(UnixGroupHelper, UnixActionHelper, Variable):
Список групп в которые необходимо добавить пользователя
"""
type = "choiceedit-list"
guitype = "hidden"
opt = ("-a", "--append")
metavalue = "GROUPS"
value = []
@ -390,6 +400,7 @@ class VariableUrUnixGroupsDel(VariableUrUnixGroupsAdd):
"""
type = "choiceedit-list"
opt = ("-r", "--remove")
guitype = "hidden"
metavalue = "GROUPS"
value = []

6
pym/unix/wsdl_unix.py

@ -382,16 +382,16 @@ class Wsdl(WsdlBase):
'ur_unix_primary_group',
'ur_unix_comment',
'ur_unix_groups',
'ur_unix_visible_set',
'ur_unix_lock_set',
),
expert=(
'ur_unix_groups_add',
'ur_unix_groups_del',
'ur_unix_lock_set',
'ur_unix_pw_delete_set',
'ur_unix_visible_set',
'ur_unix_home_path',
'ur_unix_home_path_move',
'ur_unix_shell',
'ur_unix_pw_delete_set',
),
custom_buttons=[
CustomButton.run_method(Unix.Method.UserShow,

Loading…
Cancel
Save