[freeside-commits] freeside/FS/FS AccessRight.pm, 1.29, 1.30 access_right.pm, 1.2, 1.3 addr_block.pm, 1.8, 1.9 router.pm, 1.4, 1.5
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Sep 3 12:08:29 PDT 2008
- Previous message: [freeside-commits] freeside/FS/FS Upgrade.pm, 1.1.2.16, 1.1.2.17 cust_pkg_reason.pm, 1.1.2.2, 1.1.2.3
- Next message: [freeside-commits] freeside/httemplate/browse addr_block.cgi, 1.9, 1.10 router.cgi, 1.13, 1.14 svc_acct_pop.cgi, 1.21, 1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv5601/FS/FS
Modified Files:
AccessRight.pm access_right.pm addr_block.pm router.pm
Log Message:
new access right names
Index: addr_block.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/addr_block.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- addr_block.pm 28 Jun 2008 19:25:23 -0000 1.8
+++ addr_block.pm 3 Sep 2008 19:08:27 -0000 1.9
@@ -124,7 +124,7 @@
$self->ut_number('routernum')
|| $self->ut_ip('ip_gateway')
|| $self->ut_number('ip_netmask')
- || $self->ut_agentnum_acl('agentnum', 'Engineering global configuration')
+ || $self->ut_agentnum_acl('agentnum', 'Broadband global configuration')
;
return $error if $error;
Index: AccessRight.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/AccessRight.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- AccessRight.pm 3 Sep 2008 01:46:43 -0000 1.29
+++ AccessRight.pm 3 Sep 2008 19:08:27 -0000 1.30
@@ -240,8 +240,11 @@
'Edit billing events',
{ rightname=>'Edit global billing events', global=>1 },
- { rightname=>'Engineering configuration' },
- { rightname=>'Engineering global configuration', global=>1 },
+ { rightname=>'Dialup configuration' },
+ { rightname=>'Dialup global configuration', global=>1 },
+
+ { rightname=>'Broadband configuration' },
+ { rightname=>'Broadband global configuration', global=>1 },
{ rightname=>'Configuration', global=>1 }, #most of the rest of the configuraiton is not agent-virtualized
],
Index: access_right.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/access_right.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- access_right.pm 4 Oct 2007 00:51:34 -0000 1.2
+++ access_right.pm 3 Sep 2008 19:08:27 -0000 1.3
@@ -111,6 +111,44 @@
$self->SUPER::check;
}
+# _upgrade_data
+#
+# Used by FS::Upgrade to migrate to a new database.
+
+sub _upgrade_data { # class method
+ my ($class, %opts) = @_;
+
+ my @unmigrated = ( qsearch( 'access_right',
+ { 'righttype'=>'FS::access_group',
+ 'rightname'=>'Engineering configuration',
+ }
+ ),
+ qsearch( 'access_right',
+ { 'righttype'=>'FS::access_group',
+ 'rightname'=>'Engineering global configuration',
+ }
+ )
+ );
+ foreach ( @unmigrated ) {
+ my $rightname = $_->rightname;
+ $rightname =~ s/Engineering/Dialup/;
+ $_->rightname($rightname);
+ my $error = $_->replace;
+ die "Failed to update access right: $error"
+ if $error;
+ my $broadband = new FS::access_right { $_->hash };
+ $rightname =~ s/Dialup/Broadband/;
+ $broadband->rightnum('');
+ $broadband->rightname($rightname);
+ $error = $broadband->insert;
+ die "Failed to insert access right: $error"
+ if $error;
+ }
+
+ '';
+
+}
+
=back
=head1 BUGS
Index: router.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/router.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- router.pm 28 Jun 2008 19:25:23 -0000 1.4
+++ router.pm 3 Sep 2008 19:08:27 -0000 1.5
@@ -83,7 +83,7 @@
my $error =
$self->ut_numbern('routernum')
|| $self->ut_text('routername')
- || $self->ut_agentnum_acl('agentnum', 'Engineering global configuration')
+ || $self->ut_agentnum_acl('agentnum', 'Broadband global configuration')
;
return $error if $error;
- Previous message: [freeside-commits] freeside/FS/FS Upgrade.pm, 1.1.2.16, 1.1.2.17 cust_pkg_reason.pm, 1.1.2.2, 1.1.2.3
- Next message: [freeside-commits] freeside/httemplate/browse addr_block.cgi, 1.9, 1.10 router.cgi, 1.13, 1.14 svc_acct_pop.cgi, 1.21, 1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list