Compare commits
7 Commits
11_0_0-125
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 774b7ab4ee | |||
| 99dc0a15da | |||
| 0dfbdf3d36 | |||
| 820551b076 | |||
| 1a37667a9c | |||
| c1aab3eb84 | |||
| 18442c0145 |
@@ -17,6 +17,8 @@ use Data::Validate::IP qw(is_ipv4 is_ipv6);
|
|||||||
use constant FALSE => 0;
|
use constant FALSE => 0;
|
||||||
use constant TRUE => 1;
|
use constant TRUE => 1;
|
||||||
|
|
||||||
|
our @EXPORT_OK = qw(get_current_webmail_status);
|
||||||
|
|
||||||
|
|
||||||
#The most common ones - open DB when required.
|
#The most common ones - open DB when required.
|
||||||
our $cdb;
|
our $cdb;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ sub do_update {
|
|||||||
$res = $c->pseudonym_clash($first);
|
$res = $c->pseudonym_clash($first);
|
||||||
$result .= $res unless $res eq 'OK';
|
$result .= $res unless $res eq 'OK';
|
||||||
|
|
||||||
if ($mail) {
|
if (defined $mail) {
|
||||||
$res = $c->emailforward($mail);
|
$res = $c->emailforward($mail);
|
||||||
$result .= $res unless $res eq 'OK';
|
$result .= $res unless $res eq 'OK';
|
||||||
}
|
}
|
||||||
@@ -217,7 +217,7 @@ sub do_update {
|
|||||||
$res = $c->pseudonym_clash($first);
|
$res = $c->pseudonym_clash($first);
|
||||||
$result .= $res unless $res eq 'OK';
|
$result .= $res unless $res eq 'OK';
|
||||||
|
|
||||||
if ($mail) {
|
if (defined $mail) {
|
||||||
$res = $c->emailforward($mail);
|
$res = $c->emailforward($mail);
|
||||||
$result .= $res unless $res eq 'OK';
|
$result .= $res unless $res eq 'OK';
|
||||||
}
|
}
|
||||||
@@ -554,27 +554,31 @@ sub pseudonym_clash {
|
|||||||
|
|
||||||
sub emailforward {
|
sub emailforward {
|
||||||
my ($c, $data) = @_;
|
my ($c, $data) = @_;
|
||||||
my $response = $c->email_simple($data);
|
#$c->app->log->info("emailformward called with $data!");
|
||||||
|
|
||||||
if ($response eq "OK") {
|
# Trim whitespace from $data
|
||||||
return "OK";
|
$data =~ s/^\s+|\s+$//g if defined $data;
|
||||||
} elsif ($data eq "") {
|
|
||||||
|
|
||||||
# Blank is ok, only if we're not forwarding, which means that the
|
# Check simple email validation first
|
||||||
# EmailForward param must be set to 'local'.
|
return "OK" if $c->email_simple($data) eq "OK";
|
||||||
|
|
||||||
|
# If trimmed data is empty
|
||||||
|
if ($data eq "") {
|
||||||
my $email_forward = $c->param('EmailForward') || '';
|
my $email_forward = $c->param('EmailForward') || '';
|
||||||
$email_forward =~ s/^\s+|\s+$//g;
|
$email_forward =~ s/^\s+|\s+$//g;
|
||||||
return 'OK' if $email_forward eq 'local';
|
return 'OK' if $email_forward eq 'local';
|
||||||
return $c->l('usr_CANNOT_CONTAIN_WHITESPACE');
|
return $c->l('usr_CANNOT_CONTAIN_WHITESPACE');
|
||||||
} else {
|
}
|
||||||
return $c->l('usr_CANNOT_CONTAIN_WHITESPACE')
|
|
||||||
if ($data =~ /\s+/);
|
|
||||||
|
|
||||||
# Permit a local address.
|
# Reject if $data contains any whitespace inside
|
||||||
return "OK" if $data =~ /^[a-zA-Z][a-zA-Z0-9\._\-]*$/;
|
return $c->l('usr_CANNOT_CONTAIN_WHITESPACE') if $data =~ /\s/;
|
||||||
return $c->l('usr_UNACCEPTABLE_CHARS');
|
|
||||||
} ## end else [ if ($response eq "OK")]
|
# Allow local address pattern
|
||||||
} ## end sub emailforward
|
return "OK" if $data =~ /^[a-zA-Z][a-zA-Z0-9._-]*$/;
|
||||||
|
|
||||||
|
# Otherwise reject for unacceptable chars
|
||||||
|
return $c->l('usr_UNACCEPTABLE_CHARS');
|
||||||
|
}
|
||||||
|
|
||||||
sub get_groups {
|
sub get_groups {
|
||||||
my ($c) = shift;
|
my ($c) = shift;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
|
'rc_WEBMAIL_DISABLED' => 'Webmail is disabled in Email Settings panel',
|
||||||
@@ -519,3 +519,8 @@ div.roundcube #roundcube{
|
|||||||
margin-left: auto!important;
|
margin-left: auto!important;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.incolumn {
|
||||||
|
margin:auto;
|
||||||
|
color:red;
|
||||||
|
}
|
||||||
@@ -122,6 +122,7 @@
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
margin-top:-20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header2 {
|
#header2 {
|
||||||
@@ -291,3 +292,7 @@ background-color: #e8f3e1;
|
|||||||
.busy {
|
.busy {
|
||||||
cursor: wait; /* Change the cursor to a 'wait' cursor */
|
cursor: wait; /* Change the cursor to a 'wait' cursor */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#swt_theme {
|
||||||
|
margin-left:10px;
|
||||||
|
}
|
||||||
@@ -263,8 +263,12 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
|
|
||||||
function displayLocaleAndFlag() {
|
function displayLocaleAndFlag() {
|
||||||
// Get the browser locale
|
// Get the browser locale
|
||||||
const userLocale = navigator.language || navigator.userLanguage;
|
const userLocale = navigator.languages && navigator.languages.length
|
||||||
|
? navigator.languages[0]
|
||||||
|
: navigator.language;
|
||||||
|
|
||||||
//alert(`User Locale: ${userLocale}`); // Alert the detected locale
|
//alert(`User Locale: ${userLocale}`); // Alert the detected locale
|
||||||
|
console.log(navigator.languages); // Log language to console
|
||||||
|
|
||||||
const { flag, isUnknown, countryCode } = getFlagEmoji(userLocale);
|
const { flag, isUnknown, countryCode } = getFlagEmoji(userLocale);
|
||||||
|
|
||||||
|
|||||||
@@ -35,13 +35,13 @@
|
|||||||
|
|
||||||
% foreach my $group (@$groups)
|
% foreach my $group (@$groups)
|
||||||
% {
|
% {
|
||||||
|
% my $csrf_token = "TOKEN"; # CSRF token for security
|
||||||
|
% my $group_name = $group->key; # group name extracted from the data structure
|
||||||
<tr>
|
<tr>
|
||||||
%= t td => ( class => 'sme-border' ) => $group->key
|
%= t td => ( class => 'sme-border' ) => $group->key
|
||||||
%= t td => ( class => 'sme-border' ) => $group->prop('Description')
|
%= t td => ( class => 'sme-border' ) => $group->prop('Description')
|
||||||
<td class='sme-border' style="min-width:15em">
|
<td class='sme-border' style="min-width:15em">
|
||||||
% my $modify_text = l('MODIFY'); # Localized text
|
% my $modify_text = l('MODIFY'); # Localized text
|
||||||
% my $csrf_token = "TOKEN"; # CSRF token for security
|
|
||||||
% my $group_name = $group->key; # group name extracted from the data structure
|
|
||||||
% my $actionModify = qq{
|
% my $actionModify = qq{
|
||||||
% <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name"
|
% <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name"
|
||||||
% class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
|
% class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
|
||||||
@@ -52,8 +52,6 @@
|
|||||||
% </a>
|
% </a>
|
||||||
% };
|
% };
|
||||||
% my $remove_text = l('REMOVE'); # Localized text
|
% my $remove_text = l('REMOVE'); # Localized text
|
||||||
% my $csrf_token = "TOKEN"; # CSRF token for security
|
|
||||||
% my $group_name = $group->key; # group name extracted from the data structure
|
|
||||||
% my $actionRemove = qq{
|
% my $actionRemove = qq{
|
||||||
% <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name"
|
% <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name"
|
||||||
% class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
|
% class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<div id='usr_list'>
|
<div id='usr_list'>
|
||||||
|
|
||||||
|
% use constant FALSE => 0;
|
||||||
|
% use constant TRUE => 1;
|
||||||
|
|
||||||
% my $btn = l('usr_ADD_USER');
|
% my $btn = l('usr_ADD_USER');
|
||||||
|
|
||||||
@@ -153,7 +155,9 @@
|
|||||||
<%= $c->render_to_string( inline => $actionResetPw ) %>
|
<%= $c->render_to_string( inline => $actionResetPw ) %>
|
||||||
<%= $c->render_to_string( inline => $actionLock ) %>
|
<%= $c->render_to_string( inline => $actionLock ) %>
|
||||||
<%= $c->render_to_string( inline => $actionRemove ) %>
|
<%= $c->render_to_string( inline => $actionRemove ) %>
|
||||||
<%= $c->render_to_string( inline => $actionroundcube ) %>
|
% if ($c->SrvMngr::Controller::Emailsettings::get_current_webmail_status(FALSE) ne 'disabled'){
|
||||||
|
<%= $c->render_to_string( inline => $actionroundcube ) %>
|
||||||
|
% }
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
% }
|
% }
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
%= l 'usr_GROUP_MEMBERSHIPS'
|
%= l 'usr_GROUP_MEMBERSHIPS'
|
||||||
</span>
|
</span>
|
||||||
<span class=data>
|
<span class=data>
|
||||||
<table class="sme-border "><thead>
|
<table class="sme-border incolumn"><thead>
|
||||||
<tr><th class='sme-border'>
|
<tr><th class='sme-border'>
|
||||||
%= l 'usr_MEMBER'
|
%= l 'usr_MEMBER'
|
||||||
</th><th class='sme-border'>
|
</th><th class='sme-border'>
|
||||||
|
|||||||
@@ -5,11 +5,8 @@
|
|||||||
|
|
||||||
% if (config->{debug} == 1) {
|
% if (config->{debug} == 1) {
|
||||||
<p>
|
<p>
|
||||||
%= dumper "<pf>" . $c->current_route
|
%= dumper $c->current_route
|
||||||
%= dumper $c->stash("ret")
|
%= dumper $pf_datas
|
||||||
%= dumper $c->stash("portforwarding")
|
|
||||||
% my $ref = $pf_datas->{portforwarding};
|
|
||||||
%= dumper $ref->{TCP}->[0] . "</pf>"
|
|
||||||
</p>
|
</p>
|
||||||
% }
|
% }
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
% layout 'default', title => "Sme server 2 - roundcube";
|
% layout 'default', title => "Sme server 2 - roundcube";
|
||||||
|
% use constant FALSE => 0;
|
||||||
|
% use constant TRUE => 1;
|
||||||
% content_for 'module' => begin
|
% content_for 'module' => begin
|
||||||
|
|
||||||
|
|
||||||
<div id='roundcube' class='roundcube roundcube-panel module'>
|
<div id='roundcube' class='roundcube roundcube-panel module'>
|
||||||
% if (config->{debug} == 1) {
|
% if (config->{debug} == 1) {
|
||||||
<p>
|
<p>
|
||||||
@@ -15,26 +14,26 @@
|
|||||||
</div>
|
</div>
|
||||||
% }
|
% }
|
||||||
<h1><%= $title %></h1><br>
|
<h1><%= $title %></h1><br>
|
||||||
<p>If the Webmail panel does not appear after logging in, then please check your password.</p><br />
|
% if ($c->SrvMngr::Controller::Emailsettings::get_current_webmail_status(FALSE) eq 'disabled'){
|
||||||
|
<%= $c->render_to_string( inline => l('rc_WEBMAIL_DISABLED') ) %>
|
||||||
% my $thisdomain = $c->req->url->to_abs->host;
|
% } else {
|
||||||
% my $url = $c->stash('modul');
|
<p>If the Webmail panel does not appear after logging in, then please check your password.</p><br />
|
||||||
% if (!$url) {
|
% my $thisdomain = $c->req->url->to_abs->host;
|
||||||
% $url = $thisdomain . "/roundcube";
|
% my $url = $c->stash('modul');
|
||||||
|
% if (!$url) {
|
||||||
|
% $url = $thisdomain . "/roundcube";
|
||||||
|
% }
|
||||||
|
% my $username = 'admin';
|
||||||
|
% if ($url =~ /[?&]_user=([^&]+)/) {
|
||||||
|
% $username = $1;
|
||||||
|
% }
|
||||||
|
% if (!($url =~ /https:/)) {
|
||||||
|
% $url = 'https://' . $url;
|
||||||
|
% }
|
||||||
|
<div class='roundcube'>
|
||||||
|
<a href="<%= "https://" . $thisdomain . "/" %>roundcube?_user=<%= $username %>"><button class="sme-fullwindow1-button" width=20em title="<%= l('Full Window') %>"><%= l('Full Window') %></button></a>
|
||||||
|
<object id="roundcube" data="<%= $url %>" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
|
||||||
|
</div>
|
||||||
% }
|
% }
|
||||||
% my $username = 'admin';
|
|
||||||
% if ($url =~ /[?&]_user=([^&]+)/) {
|
|
||||||
% $username = $1;
|
|
||||||
% }
|
|
||||||
% if (!($url =~ /https:/)) {
|
|
||||||
% $url = 'https://' . $url;
|
|
||||||
% }
|
|
||||||
|
|
||||||
<div class='roundcube'>
|
|
||||||
<a href="<%= "https://" . $thisdomain . "/" %>roundcube?_user=<%= $username %>"><button class="sme-fullwindow1-button" width=20em title="<%= l('Full Window') %>"><%= l('Full Window') %></button></a>
|
|
||||||
<object id="roundcube" data="<%= $url %>" title="<%= $c->stash('title') %>" type="text/html" ><%= $c->stash('title') %> not found</object>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
% end
|
% end
|
||||||
@@ -2,7 +2,7 @@ Summary: Sme Server Configuration : Manager 2
|
|||||||
%define name smeserver-manager
|
%define name smeserver-manager
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 11.0.0
|
%define version 11.0.0
|
||||||
%define release 125
|
%define release 132
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
@@ -147,6 +147,27 @@ true
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 05 2025 Brian Read <brianr@koozali.org> 11.0.0-132.sme
|
||||||
|
- Supress webmail option on menu and in user accounts if webmail not enabled [SME: 12997]
|
||||||
|
|
||||||
|
* Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-131.sme
|
||||||
|
- Add fix for IE browser local/language detect [SME: 13039]
|
||||||
|
|
||||||
|
* Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-130.sme
|
||||||
|
- Adjust heading so that no white line under theme selector and move theme button in [SME: 13057]
|
||||||
|
|
||||||
|
* Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-129.sme
|
||||||
|
- Useraccounts: Clean up forward email sub and make sure blank is errored [SME: 13056]
|
||||||
|
|
||||||
|
* Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-128.sme
|
||||||
|
- Move group table to under others in User accounts setup panel [SME: 13068]
|
||||||
|
|
||||||
|
* Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-127.sme
|
||||||
|
- Group panel: Move same var declations to outside innner scope [SME: 13073]
|
||||||
|
|
||||||
|
* Tue Nov 04 2025 Brian Read <brianr@koozali.org> 11.0.0-126.sme
|
||||||
|
- Remove debugging dump in portforwarding which crashes if no data [SME: 13243]
|
||||||
|
|
||||||
* Mon Nov 03 2025 Brian Read <brianr@koozali.org> 11.0.0-125.sme
|
* Mon Nov 03 2025 Brian Read <brianr@koozali.org> 11.0.0-125.sme
|
||||||
- Arrange that Macaddress, InternalIP and comment cleared out when host entry switched to self [SME: 13207]
|
- Arrange that Macaddress, InternalIP and comment cleared out when host entry switched to self [SME: 13207]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user