[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Report v0.1



Hello Everyone,

    Please find the attached patch file. It's the beginnings of the
Report.pm. Please note that this is my first attempt ever at writing a perl
module, so it's most likely not perfect ;)

    I've tested this patch vs. today's CVS sync'd at 3:20 pm PDT.

    I very highly recommend running this patch against a development version
instead of your live version of NorthStar.

    To install this patch exectue:

    cd /your/path/to/NorthStar
    patch -p1 < /path/to/report.patch
    perl Makefile.PL
    make
    make install

    The files this modifies is:

    NorthStar.pm
    API.pm

    And it creates:

    Report.pm
    view_report.html

    It registers a Permissions Bit with Northstar (127) called "Reports." It
adds a menu header called "Reports" and a menu item called "Run Reports"

    Now, at this time it does nothing with the Permissions Bit except create
it. It doesn't check for it, or anything else. But it does show up in the
"Users" configuration.

    Here's the part where I am having problems. When I click my link, which
calls a function I've exported back, it tells me this:

        You do not have permission to execute this function

    I have debugging mode on, so here is the stack trace:

[NorthStar::init] CORE: initializing module
[NorthStar::Network::init] NETWORK: initializing module
[NorthStar::Owner::init] OWNER: initializing module
[NorthStar::Device::init] DEVICE: initializing module
[NorthStar::Location::init] LOCATION: initializing module
[NorthStar::Search::init] SEARCH: initializing module
[NorthStar::User::init] USER: initializing module
[NorthStar::Session::init] SESSION: initializing module
[NorthStar::Template::init] TEMPLATE: initializing module
[NorthStar::Regex::init] REGEX: initializing module
[NorthStar::View::init] VIEW: initializing module
[NorthStar::Report::init] REPORT: initializing module
[NorthStar::API::API_PermissionsCheckPerm] bit=
 at /usr/lib/perl5/site_perl/5.6.1/NorthStar/API.pm line 712
        NorthStar::API::API_ExitError('You do not have permission to execute
this function') called at /usr/lib/perl5/site_perl/5.6.1/NorthStar.pm line
171
        NorthStar::VoodooMagic() called at
/usr/lib/perl5/site_perl/5.6.1/NorthStar.pm line 156
        NorthStar::main() called at
/usr/lib/perl5/site_perl/5.6.1/NorthStar.pm line 92
        NorthStar::run('NorthStar=HASH(0x80fbb0c)') called at
/var/www/html/NorthStar/NorthStar.cgi line 7

    Anyone have any thoughts?

Thanks,

Adam "Tauvix" Debus
Network Administrator, ReachONE Internet
adam@reachone.com

Attachment: report.patch
Description: Binary data