projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix bug in Setup.pm for LATA/MSA population, RT11291
[freeside.git]
/
FS
/
FS
/
Setup.pm
diff --git
a/FS/FS/Setup.pm
b/FS/FS/Setup.pm
index
cba3c7e
..
13d6f60
100644
(file)
--- a/
FS/FS/Setup.pm
+++ b/
FS/FS/Setup.pm
@@
-53,6
+53,8
@@
sub create_initial_data {
populate_access();
populate_msgcat();
populate_access();
populate_msgcat();
+
+ populate_numbering();
if ( $oldAutoCommit ) {
dbh->commit or die dbh->errstr;
if ( $oldAutoCommit ) {
dbh->commit or die dbh->errstr;
@@
-60,6
+62,11
@@
sub create_initial_data {
}
}
+sub populate_numbering {
+ eval "use FS::lata_Data;"; # this automatically populates the lata table, if unpopulated
+ eval "use FS::msa_Data;"; # this automatically populates the msa table, if unpopulated
+}
+
sub populate_locales {
use Locale::Country;
sub populate_locales {
use Locale::Country;
@@
-153,7
+160,7
@@
sub populate_initial_data {
die $@ if $@;
$class->_populate_initial_data(%opt)
die $@ if $@;
$class->_populate_initial_data(%opt)
- if $class->can('_populate_inital_data');
+ if $class->can('_populate_init
i
al_data');
my @records = @{ $data->{$table} };
my @records = @{ $data->{$table} };
@@
-181,6
+188,16
@@
sub initial_data {
#tie my %hash, 'Tie::DxHash',
tie my %hash, 'Tie::IxHash',
#tie my %hash, 'Tie::DxHash',
tie my %hash, 'Tie::IxHash',
+ #bootstrap user
+ 'access_user' => [
+ { 'username' => 'fs_bootstrap',
+ '_password' => 'changeme', #will trigger warning if you try to enable
+ 'last' => 'User',
+ 'first' => 'Bootstrap',
+ 'disabled' => 'Y',
+ },
+ ],
+
#superuser group
'access_group' => [
{ 'groupname' => 'Superuser' },
#superuser group
'access_group' => [
{ 'groupname' => 'Superuser' },
@@
-348,11
+365,12
@@
sub initial_data {
#not yet....
#not yet....
- #)
-
#usage classes
'usage_class' => [],
#usage classes
'usage_class' => [],
+ #phone types
+ 'phone_type' => [],
+
;
\%hash;
;
\%hash;
@@
-364,7
+382,7
@@
sub populate_access {
use FS::AccessRight;
use FS::access_right;
use FS::AccessRight;
use FS::access_right;
- foreach my $rightname ( FS::AccessRight->rights ) {
+ foreach my $rightname ( FS::AccessRight->
default_superuser_
rights ) {
my $access_right = new FS::access_right {
'righttype' => 'FS::access_group',
'rightobjnum' => 1, #$supergroup->groupnum,
my $access_right = new FS::access_right {
'righttype' => 'FS::access_group',
'rightobjnum' => 1, #$supergroup->groupnum,