/[smeserver]/rpms/smeserver-manager/sme10/smeserver-manager-0.1.2-public_access.patch
ViewVC logotype

Annotation of /rpms/smeserver-manager/sme10/smeserver-manager-0.1.2-public_access.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Mon Jun 21 15:09:37 2021 UTC (2 years, 11 months ago) by michel
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
make: « clog » est à jour.

1 michel 1.1 diff -urN smeserver-manager-0.1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27SManagerProxyPass smeserver-manager-0.1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27SManagerProxyPass
2     --- smeserver-manager-0.1.2.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27SManagerProxyPass 2021-04-20 22:54:26.000000000 +0400
3     +++ smeserver-manager-0.1.2/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/27SManagerProxyPass 2021-04-21 15:00:38.000000000 +0400
4     @@ -5,6 +5,7 @@
5     $plainTextAccess = ${'httpd-admin'}{PermitPlainTextAccess} || 'no';
6     $plainPort = ${'httpd-e-smith'}{TCPPort} || '80';
7     $adminPort2 = ${'smanager'}{TCPPort} || '982';
8     + $adminAccess = ${'smanager'}{access} || 'private';
9     $sslPort = ${modSSL}{TCPPort} || '443';
10    
11     $OUT = '';
12     @@ -25,20 +26,21 @@
13     $OUT .= " ProxyPassReverse /$place http://127.0.0.1:$adminPort2\n";
14     $OUT .= " RequestHeader set X-Forwarded-Proto 'http'\n";
15    
16     - $OUT .= " <Proxy '/$place'>\n";
17     + $OUT .= " <Location '/$place'>\n";
18     $OUT .= " order deny,allow\n";
19     $OUT .= " deny from all\n";
20     if ($port eq $plainPort)
21     {
22     $OUT .= ' allow from 127.0.0.1' . "\n";
23     }
24     - elsif (($haveSSL eq 'yes') && (($port eq $sslPort) || ($plainTextAccess ne 'yes')))
25     + elsif (($haveSSL eq 'yes') && ($port eq $sslPort) && ($adminAccess eq 'public'))
26     {
27     - $OUT .= " allow from $localAccess $externalSSLAccess\n";
28     + # $OUT .= " allow from $localAccess $externalSSLAccess\n";
29     + $OUT .= "# access public in conf db\n";
30     + $OUT .= " allow from all\n";
31     } else {
32     $OUT .= " allow from $localAccess\n";
33     }
34     -
35     - $OUT .= " </Proxy>\n";
36     + $OUT .= " </Location>\n";
37     }
38     }
39     diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Controller/Swttheme.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Controller/Swttheme.pm
40     --- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Controller/Swttheme.pm 2021-04-20 22:34:06.000000000 +0400
41     +++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Controller/Swttheme.pm 2021-04-22 21:55:58.896000000 +0400
42     @@ -39,6 +39,7 @@
43     or warn "$c->l('ERROR_UPDATING')";
44     }
45    
46     +## (not sure) $c->flash( warning => $c->l('swt_LOGIN_AGAIN') );
47     $from = '/initial' if $from eq '/';
48     $from = '/' . $from if ( $from !~ m|^\/| );
49    
50     diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/General/general_en.lex smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/General/general_en.lex
51     --- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/General/general_en.lex 2021-04-20 22:54:26.000000000 +0400
52     +++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/General/general_en.lex 2021-04-22 21:03:52.000000000 +0400
53     @@ -133,6 +133,7 @@
54     'FM_MAC_ADDRESS2' => 'The MAC address you provided was not valid.',
55     'FM_ERR_UNEXPECTED_DESC' => 'Error: unexpected or missing characters in description',
56     swt_THEME => 'Theme',
57     +swt_LOGIN_AGAIN => 'You may need to login again to see the choosed theme',
58     acs_NO => 'Not Authorized',
59     acs_LOGIN => 'Login required',
60     acs_ADMIN => 'Admin rights required',
61     diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Model/Main.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Model/Main.pm
62     --- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr/Model/Main.pm 2021-04-20 22:54:26.000000000 +0400
63     +++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr/Model/Main.pm 2021-04-21 15:21:21.867000000 +0400
64     @@ -35,6 +35,9 @@
65     $datas{'SystemName'} = $cdb->get("SystemName")->value;
66     $datas{'DomainName'} = $cdb->get("DomainName")->value;
67    
68     + my $rec = $cdb->get("smanager");
69     + $datas{'Access'} = $rec->prop('access') || 'private';
70     +
71     return \%datas;
72     }
73    
74     diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr.pm smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr.pm
75     --- smeserver-manager-0.1.2.old/root/usr/share/smanager/lib/SrvMngr.pm 2021-04-20 23:54:41.000000000 +0400
76     +++ smeserver-manager-0.1.2/root/usr/share/smanager/lib/SrvMngr.pm 2021-04-22 20:57:41.000000000 +0400
77     @@ -23,7 +23,7 @@
78     use SrvMngr::Model::Main;
79    
80    
81     -our $VERSION = '1.208';
82     +our $VERSION = '1.209';
83     $VERSION = eval $VERSION;
84    
85     use Exporter 'import';
86     @@ -201,6 +201,7 @@
87     my $c =shift;
88     return $c->is_logged_in || $c->auth_fail($c->l("acs_LOGIN"));
89     });
90     + $if_logged_in->post('/swttheme')->to('swttheme#main')->name('swttheme');
91     $if_logged_in->get('/review')->to('review#main')->name('review');
92     $if_logged_in->get('/logout')->to('logout#logout')->name('logout');
93     $if_logged_in->get('/userpassword')->to('userpassword#main')->name('passwd');
94     @@ -293,7 +294,6 @@
95     $if_admin->post('/remoteaccess')->to('remoteaccess#do_action')->name('remoteaccessact');
96    
97     $if_admin->get('/support')->to('support#main')->name('support');
98     - $if_admin->post('/swttheme')->to('swttheme#main')->name('swttheme');
99    
100     $if_admin->get('/useraccounts')->to('useraccounts#main')->name('useraccounts');
101     $if_admin->post('/useraccounts')->to('useraccounts#do_display')->name('useraccountadd');
102     @@ -389,6 +389,7 @@
103     $c->session->{Unsafe} = $datas{'Unsafe'};
104     $c->session->{SystemName} = $datas{'SystemName'};
105     $c->session->{DomainName} = $datas{'DomainName'};
106     + $c->session->{Access} = $datas{'Access'};
107     if ( not defined $c->session->{CurrentTheme} ) {
108     $c->session->{CurrentTheme} = $c->config->{theme};
109     }
110     diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep
111     --- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep 2021-04-20 22:54:26.000000000 +0400
112     +++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep 2021-04-22 20:55:36.000000000 +0400
113     @@ -22,7 +22,7 @@
114     % }
115     <div id="header">
116     %= include 'partials/_header'
117     - % if (scalar @{SrvMngr::theme_list( $c )} > 1) {
118     + % if ($c->is_logged_in && scalar @{SrvMngr::theme_list( $c )} > 1) {
119     %= include 'partials/_swt_theme'
120     % }
121     </div>
122     diff -urN smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_info.html.ep smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_info.html.ep
123     --- smeserver-manager-0.1.2.old/root/usr/share/smanager/themes/default/templates/partials/_info.html.ep 2020-11-19 11:53:26.000000000 +0400
124     +++ smeserver-manager-0.1.2/root/usr/share/smanager/themes/default/templates/partials/_info.html.ep 2021-04-22 20:53:42.000000000 +0400
125     @@ -8,4 +8,9 @@
126     Warning: a reconfigure and reboot is required before proceeding! Failure to do so now
127     may leave your system in an unknown state!</h5></div>
128     <% } %>
129     -</div>
130     + <% if ( $c->session->{Access} eq 'public' && (($config->{debug} ne '0') || ($config->{mode} ne 'production')) ) { %>
131     + <div class="sme-error"><h5>
132     + Warning: Development or debug mode enabled AND public access is offered !
133     + </h5></div>
134     + <% } %>
135     +</div>

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed