[RADIATOR] new perl script for radmin

Murat Bilal murat.bilal at ericsson.com
Tue Dec 11 03:27:54 CST 2012


Hello,

I try to add a new perl script to folder  cgi-bin/Radmin/private named editGroup.pl. I write the script but it did not work.
Also in CGIUtil.pm I take the ;
Can't locate object method "new" via package "CGI" at CGIUtil.pm line 19 error.

Line 19 is---->  $Radmin::CGIUtil::q = new CGI;

Can it be related to this error?

#!/usr/bin/perl

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
    if 0;
BEGIN
{
    # Not all web servers start us off in the  directory where
    # this executable is. Lets be consistent.
    chdir('Radmin/private') if $^O eq 'MSWin32';
}

use CGI;
use Radmin::DBSQL;
use Radmin::Util;
use Radmin::CGIUtil;
use Radmin::Site;

# Load the schema description into %Radmin::schema
&Radmin::Util::init();

%uiDesc = (
           'title' => 'ERISIM GRUPLARI',
            'fields' => [
                # fieldname   prompt      default  type   help size hotlink
                [ 'USERGROUP', 'KULLANICI GRUP',$Radmin::config{DefaultUserGroup}, 'text', 'pgfId=700749', 30],
                [ 'DEVICEGROUP', 'SSG IP', $Radmin::config{DefaultDeviceGroup}, 'menu', 'pgfId=700750',\&devMenu],
                [ 'AUTHRULE', 'Rule Name',undef, 'text', 'pgfId=700752', 50],
                [ 'PRIORITY','ONCELIK', 'undef', 'integer', 'pgfId=700758', 5],
            ],
            'type' => 'RADGROUPAUTH', # Also the name of the table
           # The names of the permissions required to use this page
           'postAdd'        => \&postAdd,
            'postUpdate'     => \&postUpdate,

           'add_permission'    => 'GROUPAUTH_A',
           'edit_permission'   => 'GROUPAUTH_E',
           'delete_permission' => 'GROUPAUTH_D',
           'view_permission'   => 'GROUPAUTH_V',
            );

&Radmin::CGIUtil::objectLister(\%uiDesc, $main::db);

sub postAdd
{
    my ($obj) = @_;

    return updateSubs($obj);
}
sub postUpdate
{
    my ($oldObj, $obj) = @_;

    return updateSubs($obj);
}
sub devMenu
{
    return [' ', $main::db->getOneCol('RADCLIENTLIST', 'NASIDENTIFIER')];
}


Unfortunately this code shows me listGroupAuth.pl page.

MURAT BİLAL
Services Engineer

Ericsson Turkey
CU Customer Support
Cyber Plaza C Blok Kat:1 No:146
Cyberpark 6800 Bilkent/Ankara
Mobile +90 554 898 98 43
murat.bilal at ericsson.com<mailto:murat.bilal at ericsson.com>
www.ericsson.com


[cid:image001.png at 01CDD791.DFBABF40]<http://www.ericsson.com/>

This Communication is Confidential. We only send and receive email on the basis of the terms set out at www.ericsson.com/email_disclaimer<http://www.ericsson.com/email_disclaimer>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open.com.au/pipermail/radiator/attachments/20121211/4b869790/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2127 bytes
Desc: image001.png
Url : http://www.open.com.au/pipermail/radiator/attachments/20121211/4b869790/attachment-0001.png 


More information about the radiator mailing list