[freeside] MySql Help

Jason Spence thalakan at frys.com
Wed Aug 1 02:02:57 PDT 2001


On Wed, Aug 01, 2001 at 12:05:47AM -0700, ivan developed
a new theory of relativity and: 
> Interesting.  If that's actually something people need to do Freeside's
> configuration stuff will have to be renamed.  I don't think so, though.
> Note the following paragraph in the documentation:

While we're on the subject of the configuration files, I'd like to do
something about mapsecrets so that it gets generated from a SQL
table.  Consider the following:

You have 150 people selling service.  Your mapsecrets file has 150
entries.  You have one agent per person selling your service.  You
have to create new agents in:

1) Apache configuration files
2) the agent table
3) mapsecrets

Now, I know you're saying "gee Jason, why don't you just have everyone
use the same agent number and sort the orders out by otaker?"

Well, because then I'd have to write FS::otakers and a bunch of other
stuff before I can even get started doing ACLs.  Yes, I said ACLs.  I
want to keep the random salespeople from suspending random accounts or
cancelling them.  Will the ACLs be done by otaker, or by agent and
then mapping the otaker to an agent?

By the way, I can't seem to figure out the intent behind the code in
htdocs (er, httemplate)/edit/cust_main.cgi re figuring out which agent
to use to generate the list of packages:

  my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } }
    qsearch( 'part_pkg', {} );

Where is $_ getting defined?

    foreach my $part_pkg ( @part_pkg ) {
      print qq!<OPTION VALUE="!,
#              $part_pkg->pkgpart. "_". $pkgpart{ $part_pkg->pkgpart }, '"';
              $part_pkg->pkgpart. "_". $part_pkg->svcpart, '"';
      print " SELECTED" if $pkgpart && ( $part_pkg->pkgpart == $pkgpart );
      print ">", $part_pkg->pkg, " - ", $part_pkg->comment;

I can't use the built in agent mechanism to do ACLs for things like
suspension and cancellation, but I can use it for selecting which
package types the marketing types are allowed to sign up.  Problem is,
I can't seem to figure out the rules as to how cust_main.cgi figures
out which packages to stick in the list of packages available for new
customers.

-- 
 - Jason

"Text processing has made it possible to right-justify any idea, even
one which cannot be justified on any other grounds."
		-- J. Finnegan, USC.



More information about the freeside-users mailing list