From f3de0c84b29bb3ef313dbd59c6793c672cc2165e Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Tue, 17 May 2016 10:33:41 +0200 Subject: [PATCH] MT#19557 Expose ac and cc in device config Change-Id: Id6012a4477b4f0fb2b7ba8bf28505a70745d6c1f --- lib/NGCP/Panel/Controller/Device.pm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/NGCP/Panel/Controller/Device.pm b/lib/NGCP/Panel/Controller/Device.pm index a78ee86e6f..1a481abf8a 100644 --- a/lib/NGCP/Panel/Controller/Device.pm +++ b/lib/NGCP/Panel/Controller/Device.pm @@ -1337,6 +1337,26 @@ sub dev_field_config :Chained('/') :PathPart('device/autoprov/config') :Args() { } else { $display_name = $sub->username; }; + my $cc = NGCP::Panel::Utils::Preferences::get_usr_preference_rs( + c => $c, + prov_subscriber => $sub, + attribute => 'cc', + ); + if($cc->first) { + $cc = $cc->first->value; + } else { + $cc = ''; + } + my $ac = NGCP::Panel::Utils::Preferences::get_usr_preference_rs( + c => $c, + prov_subscriber => $sub, + attribute => 'ac', + ); + if($ac->first) { + $ac = $ac->first->value; + } else { + $ac = ''; + } my $t38 = NGCP::Panel::Utils::Preferences::get_usr_preference_rs( c => $c, prov_subscriber => $sub, @@ -1362,6 +1382,8 @@ sub dev_field_config :Chained('/') :PathPart('device/autoprov/config') :Args() { keynum => $line->key_num, type => $line->line_type, t38 => $t38, + cc => $cc, + ac => $ac, }; if(!$ldap_attr_set && $linerange->name eq "Full Keys" && $line->line_type eq "private") { $vars->{ldap}->{dn} = "uid=".$sub->uuid . ",o=" . $sub->account_id . $vars->{ldap}->{dn};