/[smecontribs]/rpms/smeserver-freepbx/contribs9/smeserver-freepbx-0.1-userpanels.patch
ViewVC logotype

Annotation of /rpms/smeserver-freepbx/contribs9/smeserver-freepbx-0.1-userpanels.patch

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


Revision 1.2 - (hide annotations) (download)
Mon Jun 13 12:16:46 2016 UTC (8 years, 4 months ago) by unnilennium
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
bump to version 13

1 unnilennium 1.1 diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/createlinks mezzanine_patched_smeserver-freepbx-0.1/createlinks
2     --- smeserver-freepbx-0.1/createlinks 2008-11-20 13:10:39.000000000 +0100
3     +++ mezzanine_patched_smeserver-freepbx-0.1/createlinks 2008-11-20 12:57:03.000000000 +0100
4     @@ -32,7 +32,7 @@
5     my $event = 'freepbx-update';
6     templates2events("/etc/amportal.conf", qw(freepbx-update post-upgrade));
7     templates2events("/etc/httpd/conf/httpd.conf", qw(freepbx-update post-upgrade));
8     -templates2events("/etc/httpd/fpbx-conf/httpd.conf", qw(freepbx-update post-upgrade));
9     +templates2events("/etc/httpd/fpbx-conf/httpd.conf", qw(freepbx-update post-upgrade conf-userpanel));
10     templates2events("/etc/e-smith/sql/init/freepbx.sql", qw(freepbx-update post-upgrade));
11    
12     event_link("freepbx-checkinstall", $event, "10");
13     @@ -43,6 +43,8 @@
14     safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
15     safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-fpbx");
16    
17     +safe_symlink("sigusr1", "root/etc/e-smith/events/conf-userpanel/services2adjust/httpd-fpbx");
18     +
19     # Create empty files
20     safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/fpbx_access_log");
21     safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/fpbx_error_log");
22     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/AdminUsers mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/AdminUsers
23     --- smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/AdminUsers 2008-09-20 02:04:50.000000000 +0200
24     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/AdminUsers 1970-01-01 01:00:00.000000000 +0100
25     @@ -1 +0,0 @@
26     -
27     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/FopUsers mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/FopUsers
28     --- smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/FopUsers 2008-09-20 02:04:44.000000000 +0200
29     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/FopUsers 1970-01-01 01:00:00.000000000 +0100
30     @@ -1 +0,0 @@
31     -
32     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/00functions mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/00functions
33     --- smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/00functions 1970-01-01 01:00:00.000000000 +0100
34     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/00functions 2008-11-20 13:00:36.000000000 +0100
35     @@ -0,0 +1,28 @@
36     +{
37     +
38     +use esmith::AccountsDB;
39     +
40     +sub getUsersList ($){
41     + my ($panelName) = @_;
42     + my $a = esmith::AccountsDB->open_ro || die "Error opening accounts db";
43     + my @users = $a->users();
44     + my @groups = $a->groups();
45     + my @fpbxUsers = ();
46     + foreach my $user (@users){
47     + my $panels = $user->prop('AdminPanels') || '';
48     + push(@fpbxUsers,$user->key) if ($panels =~ /^(.*,)?$panelName(,.*)?$/);
49     + }
50     + foreach my $group (@groups){
51     + $panels = $group->prop('AdminPanels') || '';
52     + if ($panels =~ /^(.*,)?$panelName(,.*)?$/){
53     + my @members = split(/,/,($group->prop('Members') || ''));
54     + push(@fpbxUsers,@members);
55     + }
56     + }
57     +
58     + my %seen = ();
59     + my $u = join (' ', grep { ! $seen{ $_ }++ } @fpbxUsers);
60     + return $u;
61     +}
62     +}
63     +
64     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/90FreePBX30Admin mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/90FreePBX30Admin
65     --- smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/90FreePBX30Admin 2008-09-02 11:04:36.000000000 +0200
66     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/90FreePBX30Admin 2008-11-20 12:55:21.000000000 +0100
67     @@ -9,7 +9,7 @@
68     php_admin_flag magic_quotes_gpc Off
69     AuthType Basic
70     TKTAuthLoginURL /server-common/cgi-bin/login
71     - require user admin {my $users = ${'freepbx'}{'AdminUsers'} || ''; $users =~ s/[,;]/\ /g; return $users;}
72     + require user admin {getUsersList('freepbx');}
73     SetEnv IMGHDR_SRC "/server-common/server-manager.jpg"
74     Satisfy all
75     </Directory>
76     diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/90FreePBX40Panel mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/90FreePBX40Panel
77     --- smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/90FreePBX40Panel 2008-08-25 23:45:32.000000000 +0200
78     +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/httpd/fpbx-conf/httpd.conf/90FreePBX40Panel 2008-11-20 12:55:47.000000000 +0100
79     @@ -2,7 +2,7 @@
80     <Directory /opt/freepbx/panel/>
81     AuthType Basic
82     TKTAuthLoginURL /server-common/cgi-bin/login
83     - require user admin {my $users = ${'freepbx'}{'FopUsers'} || ''; $users =~ s/[,;]/\ /g; return $users;}
84     + require user admin {getUsersList('fop');}
85     SetEnv IMGHDR_SRC "/server-common/server-manager.jpg"
86     Satisfy all
87     </Directory>

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