1 |
diff -Nur --no-dereference smeserver-durep-1.5.0.old/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/90e-smithAccess40durep smeserver-durep-1.5.0/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/90e-smithAccess40durep |
2 |
--- smeserver-durep-1.5.0.old/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/90e-smithAccess40durep 1969-12-31 19:00:00.000000000 -0500 |
3 |
+++ smeserver-durep-1.5.0/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/90e-smithAccess40durep 2022-05-18 19:54:52.062000000 -0400 |
4 |
@@ -0,0 +1,41 @@ |
5 |
+#------------------------------------------------------------ |
6 |
+# durep for user panel |
7 |
+#------------------------------------------------------------ |
8 |
+{ |
9 |
+ use esmith::db; |
10 |
+ |
11 |
+ my %accounts; |
12 |
+ tie %accounts, 'esmith::config', '/home/e-smith/db/accounts'; |
13 |
+ |
14 |
+ my $globalpanels = db_get_prop(\%accounts, 'globalUP', 'AdminPanels'); |
15 |
+ $globalpanels = '' if ( ! defined ($globalpanels) ); |
16 |
+ my @globalpanels = split (/,/, $globalpanels, -1); |
17 |
+ |
18 |
+ my $key; |
19 |
+ my $value; |
20 |
+ my $file = "durep"; |
21 |
+ my $require = "require user "; |
22 |
+ while (($key,$value) = each %accounts) |
23 |
+ { |
24 |
+ my ($type, %properties) = split (/\|/, $value, -1); |
25 |
+ if ($type eq 'user') |
26 |
+ { |
27 |
+ my $adminpanels = db_get_prop(\%accounts, $key, 'AdminPanels'); |
28 |
+ $adminpanels = "" if (! defined $adminpanels ); |
29 |
+ my @adminpanels = split (/,/, $adminpanels, -1); |
30 |
+ push @adminpanels, @globalpanels ; |
31 |
+ if (grep (/^$file$/, @adminpanels)) |
32 |
+ { |
33 |
+ # Build a files require line for each panel |
34 |
+ $panelshash{$file} .= " $key" |
35 |
+ } |
36 |
+ } |
37 |
+ } |
38 |
+ |
39 |
+ $OUT .= "\n"; |
40 |
+ $OUT .= " <Directory \"/etc/e-smith/web/panels/manager/html/durep\"> \n"; |
41 |
+ $OUT .= " require user admin$panelshash{$file}\n"; |
42 |
+ $OUT .= " </Directory>\n"; |
43 |
+ |
44 |
+} |
45 |
+ |