diff --git a/acl/edit_sync.cgi b/acl/edit_sync.cgi index 520e6da00..599a8ab85 100755 --- a/acl/edit_sync.cgi +++ b/acl/edit_sync.cgi @@ -2,37 +2,39 @@ # edit_sync.cgi # Display unix/webmin user synchronization +use strict; +use warnings; require './acl-lib.pl'; +our (%in, %text, %config, %access); $access{'sync'} && $access{'create'} && $access{'delete'} || &error($text{'sync_ecannot'}); &ui_print_header(undef, $text{'sync_title'}, ""); -@glist = &list_groups(); +my @glist = &list_groups(); if (!@glist) { print "
$text{'sync_nogroups'}
\n"; &ui_print_footer("", $text{'index_return'}); exit; } -print "
\n"; +# Assign new users to group +print &ui_table_row($text{'sync_group'}, + &ui_select("group", $config{'sync_group'}, + [ map { $_->{'name'} } @glist ])); + +print &ui_table_end(); +print &ui_form_end([ [ undef, $text{'save'} ] ]); &ui_print_footer("", $text{'index_return'}); diff --git a/acl/lang/en b/acl/lang/en index 82227467f..2bc5e935f 100644 --- a/acl/lang/en +++ b/acl/lang/en @@ -292,6 +292,7 @@ convert_users=Users to convert sync_title=Unix User Synchronization sync_desc=This form allows you to configure the automatic synchronization of Unix users created through Webmin and users in this module. sync_nogroups=No Webmin groups have been defined on your system. At least one group must be created to set the access for created users. +sync_when=When to synchronize sync_create=Create a Webmin user when a Unix user is created. sync_update=Update the matching Webmin user when a Unix user is updated. sync_delete=Delete the matching Webmin user when a Unix user is deleted. diff --git a/acl/save_sync.cgi b/acl/save_sync.cgi index 7bef16151..3a4fba59d 100755 --- a/acl/save_sync.cgi +++ b/acl/save_sync.cgi @@ -2,7 +2,10 @@ # save_sync.cgi # Save unix/webmin user synchronization +use strict; +use warnings; require './acl-lib.pl'; +our (%in, %text, %config, %access, $module_config_directory); &ReadParse(); $access{'sync'} && $access{'create'} && $access{'delete'} || &error($text{'sync_ecannot'});