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 --- 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 +++ 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 @@ -0,0 +1,41 @@ +#------------------------------------------------------------ +# durep for user panel +#------------------------------------------------------------ +{ + use esmith::db; + + my %accounts; + tie %accounts, 'esmith::config', '/home/e-smith/db/accounts'; + + my $globalpanels = db_get_prop(\%accounts, 'globalUP', 'AdminPanels'); + $globalpanels = '' if ( ! defined ($globalpanels) ); + my @globalpanels = split (/,/, $globalpanels, -1); + + my $key; + my $value; + my $file = "durep"; + my $require = "require user "; + while (($key,$value) = each %accounts) + { + my ($type, %properties) = split (/\|/, $value, -1); + if ($type eq 'user') + { + my $adminpanels = db_get_prop(\%accounts, $key, 'AdminPanels'); + $adminpanels = "" if (! defined $adminpanels ); + my @adminpanels = split (/,/, $adminpanels, -1); + push @adminpanels, @globalpanels ; + if (grep (/^$file$/, @adminpanels)) + { + # Build a files require line for each panel + $panelshash{$file} .= " $key" + } + } + } + + $OUT .= "\n"; + $OUT .= " \n"; + $OUT .= " require user admin$panelshash{$file}\n"; + $OUT .= " \n"; + +} +