Slight mod to custom template and add remoteuseraccess files

This commit is contained in:
Brian Read 2025-05-15 12:52:41 +01:00
parent 8977d629e7
commit 386e602958
14 changed files with 1398 additions and 0 deletions

View File

@ -0,0 +1,215 @@
#
# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 12:40:04
#
#
# Routines to be edited by the developer to provide content and validation for parameters
# and provison of the control data for table(s)
#
use esmith::util;
use esmith::util::network;
use esmith::ConfigDB;
use esmith::HostsDB;
use esmith::AccountsDB;
use esmith::NetworksDB;
use esmith::DomainsDB;
use constant FALSE => 0;
use constant TRUE => 1;
#The most common ones
#my $cdb
#my $adb
#my $ndb
#my $hdb
#my $ddb
# Validation routines - parameters for each panel
sub validate_USERTABLE {
my $c = shift;
my $rua_data = shift; #Data hash as parameter
# Validation for each field
my $ret = "";
if ($ret eq "") {$ret = 'ok';}
return $ret;
}
sub validate_PARAMS {
my $c = shift;
my $rua_data = shift; #Data hash as parameter
# Validation for each field
my $ret = "";
if (! TRUE) #validate $c->param('Account')
{$ret .= 'Validation for Account failed';}
if (! TRUE) #validate $c->param('User_Name')
{$ret .= 'Validation for User_Name failed';}
if (! TRUE) #validate $c->param('Shell')
{$ret .= 'Validation for Shell failed';}
if (! TRUE) #validate $c->param('Sudoer')
{$ret .= 'Validation for Sudoer failed';}
if (! TRUE) #validate $c->param('VPNClientAccess')
{$ret .= 'Validation for VPNClientAccess failed';}
if (! TRUE) #validate $c->param('ChrootDir2')
{$ret .= 'Validation for ChrootDir2 failed';}
if (! TRUE) #validate $c->param('ChrootDir')
{$ret .= 'Validation for ChrootDir failed';}
if (! TRUE) #validate $c->param('sshKeys')
{$ret .= 'Validation for sshKeys failed';}
if ($ret eq "") {$ret = 'ok';}
return $ret;
}
# Get singleton data for each panel
sub get_data_for_panel_USERTABLE {
# Return a hash with the fields required which will be loaded into the shared data
my $c = shift;
my %ret = (
'Data1'=>'Data for USERTABLE', #Example
# fields from Inputs in USERTABLE $fields['USERTABLE']
);
return %ret;
}
sub get_data_for_panel_PARAMS {
# Return a hash with the fields required which will be loaded into the shared data
my $c = shift;
my %ret = (
'Data1'=>'Data for PARAMS', #Example
# fields from Inputs in PARAMS $fields['PARAMS']
'Account'=>'Account contents',
'User_Name'=>'User_Name contents',
'Shell'=>'Shell contents',
'Sudoer'=>'Sudoer contents',
'VPNClientAccess'=>'VPNClientAccess contents',
'ChrootDir2'=>'ChrootDir2 contents',
'ChrootDir'=>'ChrootDir contents',
'sshKeys'=>'sshKeys contents',
);
return %ret;
}
# Get control data for table(s)
# Define a constant hash for field name mapping
use constant getAllUsers_FIELD_MAPPING => (
'Account' => 'Source-for-Account',
'User_Name' => 'Source-for-User_Name',
'Shell_Access' => 'Source-for-Shell_Access',
'Sudo' => 'Source-for-Sudo',
'SSH_Keys' => 'Source-for-SSH_Keys',
'Chroot_Path' => 'Source-for-Chroot_Path',
'RSSH_+_VPN_Access' => 'Source-for-RSSH_+_VPN_Access',
'Modify' => 'Source-for-Modify'
#'target_field2' => 'source_field2',
# Add more mappings as needed
);
sub actual_getAllUsers {
my @ret = ();
# Actual code for extracting getAllUsers
return @ret;
}
sub get_getAllUsers {
# Return an array of hashes of the contents for each row and column for getAllUsers
my $c = shift;
my @source_records = $c->actual_getAllUsers();
my @transformed_records;
my %Field_Mapping = getAllUsers_FIELD_MAPPING();
# Iterate over each record in the source array
for my $source_record (@source_records) {
my %transformed_record;
# Iterate over each key-value pair in the $Field_Mapping constant
while (my ($target, $source) = each %Field_Mapping) {
# Check if the source field exists in the source record
if (exists $source_record->{$source}) {
# Assign the source field value to the target field in the transformed record
$transformed_record{$target} = $source_record->{$source};
}
}
# Add transformed record to the array if it's not empty
push @transformed_records, \%transformed_record if %transformed_record;
}
return \@transformed_records;
}
# Return hash with values from row in which link clicked on table
sub get_selected_USERTABLE {
my $c = shift;
my $selected = shift; #Parameter is name of selected row.
my $is_new_record = shift; #Indicates new record required (defaults)
my %ret = {};
return %ret;
}
sub get_selected_PARAMS {
my $c = shift;
my $selected = shift; #Parameter is name of selected row.
my $is_new_record = shift; #Indicates new record required (defaults)
my %ret = {};
return %ret;
}
#after sucessful modify or create or whatever and submit then perfom (if the params validate)
sub perform_USERTABLE {
my $c = shift;
my $rua_data = shift; #Data hash as parameter
my $ret = "";
my $db = $cdb; #maybe one of the others
my $dbkey = 'ChangeThis';
# To make it write to DB as comment, delete this (regex) string in each if statement "TRUE\) \#copy or perform with value: .* e.g."
if ($ret eq "") {$ret = 'ok';}
return $ret;
}
sub perform_PARAMS {
my $c = shift;
my $rua_data = shift; #Data hash as parameter
my $ret = "";
my $db = $cdb; #maybe one of the others
my $dbkey = 'ChangeThis';
# To make it write to DB as comment, delete this (regex) string in each if statement "TRUE\) \#copy or perform with value: .* e.g."
if (! TRUE) #copy or perform with value: Account e.g. $db->set_prop($dbkey,'Account',$c->param('Account'),type=>'service'))
{$ret .= 'Perform/save failed for Account';}
if (! TRUE) #copy or perform with value: User_Name e.g. $db->set_prop($dbkey,'User_Name',$c->param('User_Name'),type=>'service'))
{$ret .= 'Perform/save failed for User_Name';}
if (! TRUE) #copy or perform with value: Shell e.g. $db->set_prop($dbkey,'Shell',$c->param('Shell'),type=>'service'))
{$ret .= 'Perform/save failed for Shell';}
if (! TRUE) #copy or perform with value: Sudoer e.g. $db->set_prop($dbkey,'Sudoer',$c->param('Sudoer'),type=>'service'))
{$ret .= 'Perform/save failed for Sudoer';}
if (! TRUE) #copy or perform with value: VPNClientAccess e.g. $db->set_prop($dbkey,'VPNClientAccess',$c->param('VPNClientAccess'),type=>'service'))
{$ret .= 'Perform/save failed for VPNClientAccess';}
if (! TRUE) #copy or perform with value: ChrootDir2 e.g. $db->set_prop($dbkey,'ChrootDir2',$c->param('ChrootDir2'),type=>'service'))
{$ret .= 'Perform/save failed for ChrootDir2';}
if (! TRUE) #copy or perform with value: ChrootDir e.g. $db->set_prop($dbkey,'ChrootDir',$c->param('ChrootDir'),type=>'service'))
{$ret .= 'Perform/save failed for ChrootDir';}
if (! TRUE) #copy or perform with value: sshKeys e.g. $db->set_prop($dbkey,'sshKeys',$c->param('sshKeys'),type=>'service'))
{$ret .= 'Perform/save failed for sshKeys';}
if ($ret eq "") {$ret = 'ok';}
return $ret;
}
sub create_link{
# WIP
my ($c,$route, $panel, $index) = @_;
my $link = "$route?trt=$panel&Selected=$index";
return $link;
}
1;

View File

@ -0,0 +1,319 @@
package SrvMngr::Controller::Remoteuseraccess;
#
# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 12:40:04
# Remember that each route must be unique (else they just overwrite each other).
# you cannot have get and post on the same name and url.
#
#----------------------------------------------------------------------
# heading : User management
# description : User Remote access
# navigation : 2000 50
#
# name : remoteuseraccess, method : get, url : /remoteuseraccess, ctlact : Remoteuseraccess#main
# name : remoteuseraccessu, method : post, url : /remoteuseraccessu, ctlact : Remoteuseraccess#do_update
# name : remoteuseraccessd, method : get, url : /remoteuseraccessd, ctlact : Remoteuseraccess#do_display
#
# routes : end
#
# Documentation: https://wiki.contribs.org/Remoteuseraccess
#----------------------------------------------------------------------
#
# Scheme of things:
#
# TBA!!
use strict;
use warnings;
use Mojo::Base 'Mojolicious::Controller';
use constant FALSE => 0;
use constant TRUE => 1;
use Locale::gettext;
use SrvMngr::I18N;
use SrvMngr qw(theme_list init_session);
use Data::Dumper;
use esmith::util;
use esmith::util::network;
use esmith::ConfigDB;
use esmith::AccountsDB;
use esmith::NetworksDB;
use esmith::HostsDB;
use esmith::DomainsDB;
my $cdb;
my $adb;
my $ndb;
my $hdb;
my $ddb;
my %rua_data;
require '/usr/share/smanager/lib/SrvMngr/Controller/Remoteuseraccess-Custom.pm'; #The code that is to be added by the developer
sub main {
#
# Initial entry - route is "/<whatever>"
#
#set initial panel
#for initial panel:
#Specifiy panel to enter
#load up _data hash with DB fields
#load up stash with pointer(s) to control fields hash(= get-))
#and a pointer to the prefix_data hash
#render initial panel
my $c = shift;
$c->app->log->info( $c->log_req );
#The most common ones
$cdb = esmith::ConfigDB->open() || die("Couldn't open config db");
$adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db");
$ndb = esmith::NetworksDB->open() || die("Couldn't open Network db");
$hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db");
$ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
%rua_data = ();
my $title = $c->l('rua_User_Remote_access');
my $modul = '';
$rua_data{'trt'} = 'USERTABLE';
#Load any DB entries into the <prefix>_data area so as they are preset in the form
# which DB - this only really works if the initial panel is a PARAMS type panel and not a TABLE
my $db = $cdb; #pickup local or global db or Default to config
$c->do_display($rua_data{'trt'});
}
# Post request with params - submit from the form
sub do_update {
#
# Return after submit pushed on panel (this is a post) - route is "/<whatever>u"
# parameters in the params hash.
#
#load up all params into prefix_data hash:
#By panel (series of if statements - only one executed):
#call validate-PANEL() - return ret = ok or error message
#if validation not ok:
#render back to current panel with error message in stash
#otherwise:
#By panel (series of if statements - only one executed):
#do whatever is required: call perform-PANEL() - return "ok" or Error Message
#call signal-event for any global actions specified (check it exists - error and continue?)
#if action smeserver-<whatever>-update exists
#signal_event smeserver-<whatever>-update
#call signal-event for any specific actions for thids panel (check it exists first - error and continue)
#set success in stash
#if no "nextpanel" entry:
#set firstpanel
#else
#set nextpanel
#call render
my $c = shift;
$c->app->log->info($c->log_req);
my $modul = '';
#The most common ones - you might want to comment out any not used.
$cdb = esmith::ConfigDB->open() || die("Couldn't open config db");
$adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db");
$ndb = esmith::NetworksDB->open() || die("Couldn't open Network db");
$hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db");
$ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
my $title = $c->l('rua_User_Remote_access');
# Accessing all POST/GET parameters
my $params = $c->req->params->to_hash;
# Get number of POST parameters
#my $num_params = keys scaler %$params;
#Params are available in the hash "params" - copy to the prefix_data hash
#while (my ($key, $value) = each %{$c->req->params->to_hash}) {
# $rua_data{$key} = $value;
#}
# the value of trt will tell you which panel has returned
my $trt = $c->param('trt') || 'USERTABLE'; #hidden control on every form.
my $ret = 'ok';
#Validate the parameters in a custom sub one for each panel (although only one of these will be executed)
my $thispanel;
if ($trt eq 'USERTABLE'){
#Validate form parameters for panel USERTABLE
$ret = $c->validate_USERTABLE(\%rua_data);
$thispanel = 'USERTABLE';
}
if ($trt eq 'PARAMS'){
#Validate form parameters for panel PARAMS
$ret = $c->validate_PARAMS(\%rua_data);
$thispanel = 'PARAMS';
}
if ($ret ne "ok"){
$c->stash(error => $c->l($ret));
$c->do_display($thispanel);
} else {
#Do whatever is needed, including writing values to the DB
if ($trt eq 'USERTABLE'){
#do whatever is required ...
$ret = $c->perform_USERTABLE(\%rua_data);
if ($ret ne "ok") {
# return to the panel with error message
$c->stash(error => $c->l($ret));
$c->stash(
title => $title,
modul => $modul,
rua_data => \%rua_data
);
$c->render(template => "remoteuseraccess");
} else {
$c->stash( success => $c->l('rua_USERTABLE_panel_action_was_successful')); #A bit bland - edit it in the lex file
}
}
if ($trt eq 'PARAMS'){
#do whatever is required ...
$ret = $c->perform_PARAMS(\%rua_data);
if ($ret ne "ok") {
# return to the panel with error message
$c->stash(error => $c->l($ret));
$c->stash(
title => $title,
modul => $modul,
rua_data => \%rua_data
);
$c->render(template => "remoteuseraccess");
} else {
$c->stash( success => $c->l('rua_PARAMS_panel_action_was_successful')); #A bit bland - edit it in the lex file
}
}
# and call any signal-events needed
#TBD
# Setup shared data and call panel
if ('none' eq 'none') {
$rua_data{'trt'} = 'USERTABLE';
} else {
$rua_data{'trt'} = 'none';
}
$c->do_display($rua_data{'trt'});
}
}
sub do_display {
#
# Return after link clicked in table (this is a get) - route is "/<whatever>d"
# Expects ?trt=PANEL&selected="TableRowName" plus any other required
#
# OR it maybe a post from the main panel to add a new record
#
#load up all supplied params into prefix_data hash
#call get-selected-PANEL() - returns hash of all relevent parameters
#load up returned hash into prefix_data
#render - to called panel
my ($c,$trt) = @_;
$c->app->log->info($c->log_req);
#The most common ones - you might want to comment out any not used.
$cdb = esmith::ConfigDB->open() || die("Couldn't open config db");
$adb = esmith::AccountsDB->open() || die("Couldn't open Accounts db");
$ndb = esmith::NetworksDB->open() || die("Couldn't open Network db");
$hdb = esmith::HostsDB->open() || die("Couldn't open Hosts db");
$ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
my $title = $c->l('rua_User_Remote_access');
my $modul = "";
# Accessing all parameters
my $params = $c->req->params->to_hash;
# Get number of parameters
my $num_params = keys %$params;
#Tag as Post or Get (ie. create new entry or edit existing one
my $is_new_record = ($c->req->method() eq 'POST');
#Params are available in the hash "params" - copy to the prefix_data hash
#while (my ($key, $value) = each %{$c->req->params->to_hash}) {
# $rua_data{$key} = $value;
#}
# the value of trt will tell you which panel has returned
if (! $trt){
$trt = $c->param('trt') || 'USERTABLE'; #Indicates where to go now
}
# Now add in the params from the selected row from the table
my %selectedrow;
if ($trt eq 'USERTABLE'){
#Validate Get selected row (if applicable) USERTABLE
%selectedrow = $c->get_selected_USERTABLE($rua_data{'Selected'},$is_new_record);
}
if ($trt eq 'PARAMS'){
#Validate Get selected row (if applicable) PARAMS
%selectedrow = $c->get_selected_PARAMS($rua_data{'Selected'},$is_new_record);
}
#Copy in the selected row params to the prefix_data hash to pass to the panel
while (my ($key, $value) = each %selectedrow){
$rua_data{$key} = $value;
}
# Where to go now
$rua_data{'trt'} = $trt;
# Set up other shared data according to the panel to go to
if ($trt eq 'USERTABLE'){
# pickup any other contents needed and load them into hash shared with panel
my %returned_hash;
# subroutine returns a hash directly
%returned_hash = $c->get_data_for_panel_USERTABLE();
# Copy each key-value pair from the returned hash to the prefix data hash
while (my ($key, $value) = each %returned_hash) {
$rua_data{$key} = $value;
}
}
if ($trt eq 'PARAMS'){
# pickup any other contents needed and load them into hash shared with panel
my %returned_hash;
# subroutine returns a hash directly
%returned_hash = $c->get_data_for_panel_PARAMS();
# Copy each key-value pair from the returned hash to the prefix data hash
while (my ($key, $value) = each %returned_hash) {
$rua_data{$key} = $value;
}
}
# and table control fields
$c->stash(getAllUsers=>$c->get_getAllUsers());
# Data for panel
$c->stash(
title => $title,
modul => $modul,
rua_data => \%rua_data
);
$c->render(template => "remoteuseraccess");
}
1;

View File

@ -0,0 +1,107 @@
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 12:40:04
%#
<div id="Remoteuseraccess-PARAMS" class="partial Remoteuseraccess-PARAMS">
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $rua_data
</pre>
% }
% my $btn = l('rua_APPLY');
% $c->param(Selected => undef);
%= form_for "remoteuseraccessu" => (method => 'POST') => begin
% param 'trt' => $rua_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $rua_data->{trt}
%# Inputs etc in here.
<h1 class='head'><%=l('rua_Change_user_remote_access_settings')%></h1>
<h2 class='subh'><%=l('rua_Edit_Remote_User_Access_settings:')%></h2>
<p class='paragraph para1'>
%=l('rua_Enabling_bash_shell_access_for')
</p>
<p class='paragraph para2'>
%=l('rua_Sudo_access_allows_users_to')
</p>
<p class='paragraph para3'>
%=l('rua_SHELL,_VPN_&amp;_FTP_access')
</p>
<p class='paragraph para4'>
%=l('rua_Select_an_FTP_Chroot_path')
</p>
<p class='paragraph para5'>
%=l('rua_Enter_the_public_SSH_Keys')
</p>
<p><span class=label>
%=l('rua_Account')
</span><span class=data>
% param 'Account' => $rua_data->{Account} unless param 'Account';
%= text_field 'Account', size => '50', class => 'textinput Account' , pattern=>'.*' , placeholder=>'Account', title =>'Pattern regex mismatch', id => 'Account_text'
<br></span></p>
<p><span class=label>
%=l('rua_User_Name')
</span><span class=data>
% param 'User_Name' => $rua_data->{User_Name} unless param 'User_Name';
%= text_field 'User_Name', size => '50', class => 'textinput User_Name' , pattern=>'.*' , placeholder=>'User_Name', title =>'Pattern regex mismatch', id => 'User_Name_text'
<br></span></p>
<p><span class=label>
%=l('rua_Shell_Access')
</span><span class=data>
% my @Shell_options = [['' => ''], ['/bin/bash' => '/bin/bash']];
% param 'Shell' => $rua_data->{Shell} unless param 'Shell';
%= select_field 'Shell' => @Shell_options, class => 'input', id => 'Shell_select'
<br></span> </p>
<p><span class=label>
%=l('rua_Sudo_Access')
</span><span class=data>
% my @Sudoer_options = [['No' => 'no'], ['Yes' => 'yes']];
% param 'Sudoer' => $rua_data->{Sudoer} unless param 'Sudoer';
%= select_field 'Sudoer' => @Sudoer_options, class => 'input', id => 'Sudoer_select'
<br></span> </p>
<p><span class=label>
%=l('rua_RSSH_+_VPN__ClientAccess')
</span><span class=data>
% my @VPNClientAccess_options = [['No' => 'no'], ['Yes' => 'yes']];
% param 'VPNClientAccess' => $rua_data->{VPNClientAccess} unless param 'VPNClientAccess';
%= select_field 'VPNClientAccess' => @VPNClientAccess_options, class => 'input', id => 'VPNClientAccess_select'
<br></span> </p>
<p><span class=label>
%=l('rua_Select_Chroot_path')
</span><span class=data>
% my @ChrootDir2_options = [['getChrootdirOptions' => 'getChrootdirOptions()']];
% param 'ChrootDir2' => $rua_data->{ChrootDir2} unless param 'ChrootDir2';
%= select_field 'ChrootDir2' => @ChrootDir2_options, class => 'input', id => 'ChrootDir2_select'
<br></span> </p>
<p><span class=label>
%=l('rua_ChrootDir')
</span><span class=data>
% param 'ChrootDir' => $rua_data->{ChrootDir} unless param 'ChrootDir';
%= text_field 'ChrootDir', size => '50', class => 'textinput ChrootDir' , pattern=>'.*' , placeholder=>'ChrootDir', title =>'Pattern regex mismatch', id => 'ChrootDir_text'
<br></span></p>
<span class='data'>
%= submit_button l('rua_Save'), class => 'action subm7'
</span>
%# Probably finally by a submit.
%end
</div>

View File

@ -0,0 +1,61 @@
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 12:40:04
%#
<div id="Remoteuseraccess-USERTABLE" class="partial Remoteuseraccess-USERTABLE">
<script>
window.onload = function() {
SelectInput();
};
</script>
% if (config->{debug} == 1) {
<pre>
%= dumper $rua_data
</pre>
% }
% my $btn = l('rua_APPLY');
% $c->param(Selected => undef);
%= form_for "remoteuseraccessu" => (method => 'POST') => begin
% param 'trt' => $rua_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $rua_data->{trt}
%# Inputs etc in here.
<h1 class='head'><%=l('rua_Change_user_remote_access_settings')%></h1>
<h2 class='subh'><%=l('rua_Current_list_of_users')%></h2>
<br /><table class="sme-border TableSort sme-table tabl1 ">
<thead class='tabl1'>
<tr table-head-row>
<th class='sme-border table-head-col table-head-col-Account '><%=l('rua_Account')%></th>
<th class='sme-border table-head-col table-head-col-User Name '><%=l('rua_User_Name')%></th>
<th class='sme-border table-head-col table-head-col-Shell Access '><%=l('rua_Shell_Access')%></th>
<th class='sme-border table-head-col table-head-col-Sudo '><%=l('rua_Sudo')%></th>
<th class='sme-border table-head-col table-head-col-SSH Keys '><%=l('rua_SSH_Keys')%></th>
<th class='sme-border table-head-col table-head-col-Chroot Path '><%=l('rua_Chroot_Path')%></th>
<th class='sme-border table-head-col table-head-col-RSSH + VPN Access '><%=l('rua_RSSH_+_VPN_Access')%></th>
<th class='sme-border table-head-col table-head-col-Modify '><%=l('rua_Modify')%></th>
</tr>
</thead>
<tbody class='tabl1'>
% my $control_data = $c->stash('getAllUsers');
% foreach my $row (@$control_data) {
<tr class='table-row'>
<td class='sme-border table-col table-col-Account'><%=$c->render_to_string(inline=>$row->{'Account'})%></td>
<td class='sme-border table-col table-col-User_Name'><%=$c->render_to_string(inline=>$row->{'User_Name'})%></td>
<td class='sme-border table-col table-col-Shell_Access'><%=$c->render_to_string(inline=>$row->{'Shell_Access'})%></td>
<td class='sme-border table-col table-col-Sudo'><%=$c->render_to_string(inline=>$row->{'Sudo'})%></td>
<td class='sme-border table-col table-col-SSH_Keys'><%=$c->render_to_string(inline=>$row->{'SSH_Keys'})%></td>
<td class='sme-border table-col table-col-Chroot_Path'><%=$c->render_to_string(inline=>$row->{'Chroot_Path'})%></td>
<td class='sme-border table-col table-col-RSSH_+_VPN_Access'><%=$c->render_to_string(inline=>$row->{'RSSH_+_VPN_Access'})%></td>
<td class='sme-border table-col table-col-Modify'><%=$c->render_to_string(inline=>$row->{'Modify'})%></td>
</tr>
%}
</tbody>
</table>
%# Probably finally by a submit.
%end
</div>

View File

@ -0,0 +1,29 @@
/*
Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 12:40:04
*/
.Remoteuseraccess-panel {}
.name {}
.rout {}
.head {}
.subh {}
.tabl1 {}
thead .tabl1 {}
tbody .tabl1 {}
.name {}
.rout {}
.head {}
.subh {}
.para1 {}
.para2 {}
.para3 {}
.para4 {}
.para5 {}
.text10 {}
.text11 {}
.sele1 {}
.sele2 {}
.sele3 {}
.sele4 {}
.text5 {}
.text6 {}
.subm7 {}

View File

@ -0,0 +1,60 @@
%#
%# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 12:40:04
%#
% layout 'default', title => "Sme server 2 - User Remote access", share_dir => './';
%# css specific to this panel:
% content_for 'module' => begin
%= stylesheet '/css/remoteuseraccess.css'
%= javascript '/js/remoteuseraccess.js'
<div id="module" class="module Remoteuseraccess-panel">
% if (config->{debug} == 1) {
<pre>
%= dumper $c->current_route
%= dumper $rua_data->{trt}
</pre>
% }
<h1><%=$title%></h1>
% if ( stash('modul')) {
%= $c->render_to_string(inline => stash('modul') );
% }
%if ($c->stash('first')) {
<br><p>
%=$c->render_to_string(inline =>$c->l($c->stash('first')))
</p>
%} elsif ($c->stash('success')) {
<div class='success '>
<p>
%= $c->l($c->stash('success'));
</p>
</div>
<br />
%} elsif ($c->stash('error')) {
<div class='sme-error'>
<p>
%= $c->l($c->stash('error'));
</p>
</div>
<br />
%}
%#Routing to partials according to trt parameter.
%#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement'
% if ($rua_data->{trt} eq "USERTABLE") {
%= include 'partials/_rua_USERTABLE'
%}
% if ($rua_data->{trt} eq "PARAMS") {
%= include 'partials/_rua_PARAMS'
%}
</div>
%end

View File

@ -0,0 +1,5 @@
//
//Generated by: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 12:40:04
//
$(document).ready(function() {
});

View File

@ -0,0 +1,31 @@
#
# Generated by SM2Gen version: SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 12:40:04
#
'rua_Select_an_FTP_Chroot_path' => 'Select an FTP cheroot path from the drop down box or enter it in the text field The selection will overwrite the text field',
'rua_Sudo_Access' => 'judo Access',
'rua_Edit_Remote_User_Access_settings:' => 'Edit Remote User Access settings',
'rua_SHELL,_VPN_&amp;_FTP_access' => 'SHELL, VPN camp FTP access for users depend on the settings in the Remote Access Panel being opened',
'rua_RSSH_+_VPN__ClientAccess' => 'RSSH + VPN ClientAccess',
'rua_Modify' => 'Modify',
'rua_Sudo_access_allows_users_to' => 'judo access allows users to execute commands with the permissions of the root account without knowing the root password This is more desirable than passing around the root password Setting judo to yes also sets the shell to bash',
'rua_Select_Chroot_path' => 'Select cheroot path',
'rua_User_Remote_access' => 'User Remote access',
'rua_Enter_the_public_SSH_Keys' => 'Enter the public SSH Keys to allow ssh access without passwords Keys should be pasted as a single line But they will wrap onto three or more lines in the display To delete all keys type deletekeys.',
'rua_Account' => 'Account',
'rua_User_Name' => 'User Name',
'rua_USERTABLE_panel_action_was_successful' => 'USERTABLE panel action was successful',
'rua_Change_user_remote_access_settings' => 'Change user remote access settings',
'rua_RSSH_+_VPN_Access' => 'RSSH + VPN Access',
'rua_Shell_Access' => 'Shell Access',
'rua_APPLY' => 'Apply',
'rua_PARAMS_panel_action_was_successful' => 'PARAMS panel action was successful',
'rua_Save' => 'Save',
'rua_Sudo' => 'judo',
'rua_Chroot_Path' => 'cheroot Path',
'rua_Current_list_of_users' => 'Current list of users',
'rua_ChrootDir' => 'Chrootdir',
'rua_Enabling_bash_shell_access_for' => 'Enabling bash shell access for a user account poses a security risk Only use this option if you know what you are doing A safer option is to allow rush access (sftp, Ssh camp rsync).',
'rua_SSH_Keys' => 'SSH Keys',
'rua_User_Name' => 'User Name',
'rua_Account' => 'Account',
'rua_Shell_Access' => 'Shell Access',

View File

@ -66,6 +66,7 @@ use constant TRUE => 1;
);
sub actual_${tablecontrol[0]} {
my $c = shift;
my @ret = ();
# Actual code for extracting ${tablecontrol[0]}
return @ret;

View File

@ -0,0 +1,124 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SME Server mailserver.bjsystems.co.uk</title>
<style type="text/css">
@import url("/server-common/css/hwinfo.css");
</style>
<link rev="made" href="mailto:bugs%40koozali.org">
<meta name="copyright" content="(head.tmpl)Copyright 2003-2004 Mitel Corporation">
<link rel="stylesheet" type="text/css" href="/server-common/css/sme_core.css">
<style type="text/css">
@import url("/server-common/css/sme_main.css");
</style>
</head>
<body>
<div class="sme-error"><h5>
Warning: a reconfigure and reboot is required before proceeding! Failure to do so now
may leave your system in an unknown state!</h5></div><div class="sme-error"><h5>
URGENT NOTICE: As per June 30th 2024, SME Server 10 is obsolete, and potentially INSECURE. NO support will be offered for any issue found with this installed version.
Please migrate IMMEDIATELY to Koozali SME Server 11 or higher version. Failure to upgrade may lead to the compromise of this server.
</br>Please, consult <a href="https://wiki.koozali.org/SME_Server:Download" target="_blank">https://wiki.koozali.org/SME_Server:Download</a> to get last available version.</h5></div>
<h1>Change user remote access settings</h1>
<form method="POST" action="remoteuseraccess" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="page" value="1">
<input type="hidden" name="page_stack" value="0">
<input type=hidden name=".id" value="3faa7d7c5b6d93615f1be1cad86ccc69">
<input type="hidden" name="csrf_token" value="cjCsetV7T7sZp4HzjTKVjyqipUCPbjCaMtGeh8Pg0RD">
<table class="sme-noborders">
<tr><td colspan="2"><p><p>
Enabling bash shell access for a user account poses a security risk.
Only use this option if you know what you are doing. A safer option is to allow
rssh access (sftp, ssh & rsync).
</p>
<p>
Sudo access allows users to execute commands with the permissions
of the root account without knowing the root password. This is more desirable
than passing around the root password. Setting Sudo to yes also sets the shell to bash
</p>
<p>
SHELL, VPN & FTP access for users depend on the
settings in the Remote Access Panel being opened.
</p>
<p>
Select an FTP Chroot path from the drop down box or enter it in the text field,
the selection will overwrite the text field.
</p>
<p>
Enter the public SSH Keys to allow ssh access without passwords,
keys should be pasted as a single line,
but they will wrap onto three or more lines in the display.
To delete all keys type "deletekeys".
</p></p></td>
</tr>
<tr>
<td class="sme-noborders-label">Account
<td class="sme-noborders-content">cok1</td>
</tr>
<tr>
<td class="sme-noborders-label">User Name
<td class="sme-noborders-content">Clare Park</td>
</tr>
<tr>
<td class="sme-noborders-label">Shell Access
<td class="sme-noborders-content"><SELECT NAME="Shell" TYPE="select">
<OPTION VALUE="">
<OPTION VALUE="/bin/bash">/bin/bash
</SELECT></td>
</tr>
<tr>
<td class="sme-noborders-label">Sudo Access
<td class="sme-noborders-content"><SELECT NAME="Sudoer" TYPE="select">
<OPTION VALUE="no" SELECTED>No
<OPTION VALUE="yes">Yes
</SELECT></td>
</tr>
<tr>
<td class="sme-noborders-label">RSSH + VPN Access
<td class="sme-noborders-content"><SELECT NAME="VPNClientAccess" TYPE="select">
<OPTION VALUE="no" SELECTED>No
<OPTION VALUE="yes">Yes
</SELECT></td>
</tr>
<tr>
<td class="sme-noborders-label">Select Chroot Path
<td class="sme-noborders-content"><SELECT NAME="ChrootDir2" TYPE="select">
<OPTION VALUE="">
<OPTION VALUE="home">. ~/home
<OPTION VALUE="/home/e-smith/files">.. /home/e-smith/files
<OPTION VALUE="/home/e-smith/files/ibays/Primary">Primary
<OPTION VALUE="/home/e-smith/files/ibays/Primary/files">Primary/files
<OPTION VALUE="/home/e-smith/files/ibays/Primary/html">Primary/html
<OPTION VALUE="/home/e-smith/files/ibays/mesdb">mesdb
<OPTION VALUE="/home/e-smith/files/ibays/mesdb/files">mesdb/files
<OPTION VALUE="/home/e-smith/files/ibays/mesdb/html">mesdb/html
</SELECT></td>
</tr>
<tr>
<td class="sme-noborders-label">Chroot Path
<td class="sme-noborders-content"><INPUT VALUE="/home/e-smith/files/users/cok1/home" NAME="ChrootDir" TYPE="text" SIZE="50"></td>
</tr>
<tr>
<td class="sme-noborders-label">SSH Keys
<td class="sme-noborders-content"><TEXTAREA NAME="sshKeys" ROWS="10" COLS="30"></TEXTAREA></td>
</tr>
</table>
<table width=100%><tr><th class="sme-layout"><input type="submit" name="Next" value="Save"></th></tr></table>
</table>
</form>
<HR class="sme-copyrightbar">
<FONT class="sme-copyright">
SME Server 10.1<BR>Copyright 1999-2006 Mitel Corporation<BR>All rights reserved.
<BR>Copyright (c) 2013 - 2021 Koozali Foundation Inc.<BR>
</FONT>
</BODY>
</HTML>

View File

@ -0,0 +1,67 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SME Server mailserver.bjsystems.co.uk</title>
<style type="text/css">
@import url("/server-common/css/hwinfo.css");
</style>
<link rev="made" href="mailto:bugs%40koozali.org">
<meta name="copyright" content="(head.tmpl)Copyright 2003-2004 Mitel Corporation">
<link rel="stylesheet" type="text/css" href="/server-common/css/sme_core.css">
<style type="text/css">
@import url("/server-common/css/sme_main.css");
</style>
</head>
<body>
<div class="sme-error"><h5>
Warning: a reconfigure and reboot is required before proceeding! Failure to do so now
may leave your system in an unknown state!</h5></div><div class="sme-error"><h5>
URGENT NOTICE: As per June 30th 2024, SME Server 10 is obsolete, and potentially INSECURE. NO support will be offered for any issue found with this installed version.
Please migrate IMMEDIATELY to Koozali SME Server 11 or higher version. Failure to upgrade may lead to the compromise of this server.
</br>Please, consult <a href="https://wiki.koozali.org/SME_Server:Download" target="_blank">https://wiki.koozali.org/SME_Server:Download</a> to get last available version.</h5></div>
<h1>Change user remote access settings</h1>
<form method="POST" action="remoteuseraccess" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="page" value="0">
<input type="hidden" name="page_stack" value="">
<input type=hidden name=".id" value="8ea394551a837dc2979074089f2af281">
<input type="hidden" name="csrf_token" value="5boqpSbCiqMM9R7KtWo1zgKHs0ZwGG7slBoEnHkucF5">
<table class="sme-noborders">
<tr><td colspan="2"><h2>Current list of users</h2>
<table>
<tr bgcolor="#D4D0C8"><th>Account</th><th>User Name</th><th>Shell Access</th><th>Sudo</th><th>SSH Keys</th><th>Chroot Path</th><th>RSSH + VPN Access</th><th>Modify</th></tr>
<tr><td>brianr</td><td>Brian Read</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=brianr&FullName=Brian%20Read&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/brianr/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr bgcolor="#D4D0C8"><td>cok1</td><td>Clare Park</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=cok1&FullName=Clare%20Park&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/cok1/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr><td>cok2</td><td>Frank Park</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=cok2&FullName=Frank%20Park&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/cok2/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr bgcolor="#D4D0C8"><td>dmarc</td><td>Dmarc Dmarc</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=dmarc&FullName=Dmarc%20Dmarc&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/dmarc/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr><td>ecmw2025</td><td>ecmw 2025</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=ecmw2025&FullName=ecmw%202025&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/ecmw2025/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr bgcolor="#D4D0C8"><td>englishcountrymusicweekend</td><td>English Music Weekend</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=englishcountrymusicweekend&FullName=English%20Music%20Weekend&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/englishcountrymusicweekend/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr><td>guest</td><td>Guest Guest</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=guest&FullName=Guest%20Guest&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/guest/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr bgcolor="#D4D0C8"><td>katy</td><td>Katy Read</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=katy&FullName=Katy%20Read&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/katy/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr><td>more</td><td>More 4AllianceForFoodPurity</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=more&FullName=More%204AllianceForFoodPurity&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/more/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr bgcolor="#D4D0C8"><td>nikki</td><td>Nicola Escott</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=nikki&FullName=Nicola%20Escott&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/nikki/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr><td>phil</td><td>Phil Fermor</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=phil&FullName=Phil%20Fermor&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/phil/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr bgcolor="#D4D0C8"><td>sheila</td><td>Sheila Read</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=sheila&FullName=Sheila%20Read&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/sheila/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr><td>smeserver</td><td>sme server</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=smeserver&FullName=sme%20server&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/smeserver/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
<tr bgcolor="#D4D0C8"><td>zara.healy</td><td>Zara Healy</td><td></td><td></td><td></td><td></td><td></td><td><a href="remoteuseraccess?page=0&page_stack=&Next=Next&User=zara.healy&FullName=Zara%20Healy&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/zara.healy/home&VPNClientAccess=no&wherenext=PAGE_MODIFY">Modify</a></td></tr>
</table>
</td></tr>
</table>
</form>
<HR class="sme-copyrightbar">
<FONT class="sme-copyright">
SME Server 10.1<BR>Copyright 1999-2006 Mitel Corporation<BR>All rights reserved.
<BR>Copyright (c) 2013 - 2021 Koozali Foundation Inc.<BR>
</FONT>
</BODY>
</HTML>

View File

@ -0,0 +1,144 @@
//
// Generated by sm1-html-2-json5 version:0.5 Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 10:54:56
//
{
PackageName: 'Remoteuseraccess',
prefix: 'rua',
MenuHeading: 'User management',
MenuDescription: 'User Remote access',
MenuNavigation: '2000 50',
firstPanel: 'USERTABLE',
signalEvent: 'smeserver-remoteuseraccess-table-update',
html: [
{
Name: 'table',
route: 'USERTABLE',
Header: 'Change user remote access settings',
SubHeader: 'Current list of users',
Table1: {
Type: 'Table',
TableControl: 'getAllUsers',
TopHeadings: [
'Account',
'User Name',
'Shell Access',
'Sudo',
'SSH Keys',
'Chroot Path',
'RSSH + VPN Access',
'Modify'
],
Columns: [
'Account',
'User_Name',
'Shell_Access',
'Sudo',
'SSH_Keys',
'Chroot_Path',
'RSSH_+_VPN_Access',
'Modify'
]
}
},
{
Name: 'params',
route: 'PARAMS',
Header: 'Change user remote access settings',
SubHeader: 'Edit Remote User Access settings:',
Paragraph1: 'Enabling bash shell access for a user account poses a security risk. Only use this option if you know what you are doing. A safer option is to allow rssh access (sftp, ssh & rsync).',
Paragraph2: 'Sudo access allows users to execute commands with the permissions of the root account without knowing the root password. This is more desirable than passing around the root password. Setting Sudo to yes also sets the shell to bash',
Paragraph3: 'SHELL, VPN & FTP access for users depend on the settings in the Remote Access Panel being opened.',
Paragraph4: 'Select an FTP Chroot path from the drop down box or enter it in the text field, the selection will overwrite the text field.',
Paragraph5: 'Enter the public SSH Keys to allow ssh access without passwords, keys should be pasted as a single line, but they will wrap onto three or more lines in the display. To delete all keys type deletekeys.',
Input10 :{
Type: 'Text',
Name:'Account',
Label:'Account',
Readonly:'True',
Value:'Account'
},
Input11 :{
Type: 'Text',
Name: 'User_Name',
Label: 'User Name',
Readonly: 'True',
Value: 'User_Name'
},
Input1: {
Type: 'Select',
Value: '',
Name: 'Shell',
Label: 'Shell Access',
Options: [
{
Value: '',
Text: ''
},
{
Value: '/bin/bash',
Text: '/bin/bash'
}
]
},
Input2: {
Type: 'Select',
Value: '',
Name: 'Sudoer',
Label: 'Sudo Access',
Options: [
{
Value: 'no',
Text: 'No'
},
{
Value: 'yes',
Text: 'Yes'
}
]
},
Input3: {
Type: 'Select',
Value: '',
Name: 'VPNClientAccess',
Label: 'RSSH + VPN ClientAccess',
Options: [
{
Value: 'no',
Text: 'No'
},
{
Value: 'yes',
Text: 'Yes'
}
]
},
Input4: {
Type: 'Select',
Value: '',
Name: 'ChrootDir2',
Label: 'Select Chroot path',
Options: [{'Text':'getChrootdirOptions','Value':'getChrootdirOptions()'}]
},
Input5: {
Type: 'Text',
Value: '',
Name: 'ChrootDir',
Label: 'ChrootDir'
},
Input6: {
Type: 'Textarea',
Value: '',
Name: 'sshKeys',
Label: 'SSH Keys',
Width: '50',
Height: '10'
},
Input7: {
Type: 'Submit',
Value: 'Save',
Name: 'Save',
Label: 'Save'
}
}
]
}

View File

@ -0,0 +1,140 @@
//
// Generated by sm1-html-2-json5 version:0.5 Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 11:11:25
//
{
'PackageName': 'remoteuseraccess-params',
'prefix': '',
'MenuHeading': 'Miscellaneous',
'MenuDescription': 'remoteuseraccess-params',
'MenuNavigation': '2000 400',
'firstPanel': 'PARAMS',
'signalEvent': 'smeserver-remoteuseraccess-params-update',
'html': [
{
'Name': 'params',
'route': 'PARAMS',
'Header': 'Change user remote access settings',
'SubHeader': 'Manage remoteuseraccess-params settings:',
'Link1': {
'Type': 'Link',
'href': 'https://wiki.koozali.org/SME_Server:Download',
'title': 'https://wiki.koozali.org/SME_Server:Download'
},
'Paragraph1': 'Enabling bash shell access for a user account poses a security risk. Only use this option if you know what you are doing. A safer option is to allow rssh access (sftp, ssh & rsync).',
'Paragraph2': 'Sudo access allows users to execute commands with the permissions of the root account without knowing the root password. This is more desirable than passing around the root password. Setting Sudo to yes also sets the shell to bash',
'Paragraph3': 'SHELL, VPN & FTP access for users depend on the settings in the Remote Access Panel being opened.',
'Paragraph4': 'Select an FTP Chroot path from the drop down box or enter it in the text field, the selection will overwrite the text field.',
'Paragraph5': 'Enter the public SSH Keys to allow ssh access without passwords, keys should be pasted as a single line, but they will wrap onto three or more lines in the display. To delete all keys type deletekeys.',
'Input1': {
'Type': 'Select',
'Value': '',
'Name': 'Shell',
'Label': 'Shell',
'Options': [
{
'Value': '',
'Text': ''
},
{
'Value': '/bin/bash',
'Text': '/bin/bash'
}
]
},
'Input2': {
'Type': 'Select',
'Value': '',
'Name': 'Sudoer',
'Label': 'Sudoer',
'Options': [
{
'Value': 'no',
'Text': 'No'
},
{
'Value': 'yes',
'Text': 'Yes'
}
]
},
'Input3': {
'Type': 'Select',
'Value': '',
'Name': 'VPNClientAccess',
'Label': 'VPNClientAccess',
'Options': [
{
'Value': 'no',
'Text': 'No'
},
{
'Value': 'yes',
'Text': 'Yes'
}
]
},
'Input4': {
'Type': 'Select',
'Value': '',
'Name': 'ChrootDir2',
'Label': 'ChrootDir2',
'Options': [
{
'Value': '',
'Text': ''
},
{
'Value': 'home',
'Text': '. ~/home'
},
{
'Value': '/home/e-smith/files',
'Text': '.. /home/e-smith/files'
},
{
'Value': '/home/e-smith/files/ibays/Primary',
'Text': 'Primary'
},
{
'Value': '/home/e-smith/files/ibays/Primary/files',
'Text': 'Primary/files'
},
{
'Value': '/home/e-smith/files/ibays/Primary/html',
'Text': 'Primary/html'
},
{
'Value': '/home/e-smith/files/ibays/mesdb',
'Text': 'mesdb'
},
{
'Value': '/home/e-smith/files/ibays/mesdb/files',
'Text': 'mesdb/files'
},
{
'Value': '/home/e-smith/files/ibays/mesdb/html',
'Text': 'mesdb/html'
}
]
},
'Input5': {
'Type': 'Text',
'Value': '/home/e-smith/files/users/cok1/home',
'Name': 'ChrootDir',
'Label': 'ChrootDir'
},
'Input6': {
'Type': 'Textarea',
'Value': '',
'Name': 'sshKeys',
'Label': 'sshKeys'
},
'Input7': {
'Type': 'Submit',
'Value': 'Save',
'Name': 'Next',
'Label': 'Next'
}
}
]
}

View File

@ -0,0 +1,95 @@
//
// Generated by sm1-html-2-json5 version:0.5 Chameleon version:4.5.4 On Python:3.12.3 at 2025-05-15 10:54:56
//
{
'PackageName': 'remoteuseraccess-table',
'prefix': '',
'MenuHeading': 'Miscellaneous',
'MenuDescription': 'remoteuseraccess-table',
'MenuNavigation': '2000 400',
'firstPanel': 'PARAMS',
'signalEvent': 'smeserver-remoteuseraccess-table-update',
'html': [
{
'Name': 'params',
'route': 'PARAMS',
'Header': 'Change user remote access settings',
'SubHeader': 'Current list of users',
'Link1': {
'Type': 'Link',
'href': 'https://wiki.koozali.org/SME_Server:Download',
'title': 'https://wiki.koozali.org/SME_Server:Download'
},
'Link2': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=brianr&FullName=Brian%20Read&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/brianr/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link3': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=cok1&FullName=Clare%20Park&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/cok1/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link4': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=cok2&FullName=Frank%20Park&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/cok2/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link5': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=dmarc&FullName=Dmarc%20Dmarc&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/dmarc/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link6': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=ecmw2025&FullName=ecmw%202025&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/ecmw2025/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link7': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=englishcountrymusicweekend&FullName=English%20Music%20Weekend&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/englishcountrymusicweekend/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link8': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=guest&FullName=Guest%20Guest&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/guest/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link9': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=katy&FullName=Katy%20Read&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/katy/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link10': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=more&FullName=More%204AllianceForFoodPurity&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/more/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link11': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=nikki&FullName=Nicola%20Escott&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/nikki/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link12': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=phil&FullName=Phil%20Fermor&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/phil/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link13': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=sheila&FullName=Sheila%20Read&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/sheila/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link14': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=smeserver&FullName=sme%20server&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/smeserver/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
},
'Link15': {
'Type': 'Link',
'href': 'remoteuseraccess?page=0&page_stack=&Next=Next&User=zara.healy&FullName=Zara%20Healy&Sudoer=no&Shell=&ChrootDir=/home/e-smith/files/users/zara.healy/home&VPNClientAccess=no&wherenext=PAGE_MODIFY',
'title': 'Modify'
}
}
]
}