Add group privilege checking to the Shipping Drivers
This commit is contained in:
parent
0a004d72a0
commit
a85924d07b
9 changed files with 166 additions and 20 deletions
|
|
@ -14,7 +14,8 @@
|
|||
- fixed: In the Asset Manager, only display a Select All button if there is more than one asset.
|
||||
- fixed: Add a progress indicator for long running functions so the user knows something is happening.
|
||||
- fixed: In the Asset Manager, if you pasted an package or prototype if returned you to the page instead the manager.
|
||||
- fixed: #10551: paypal (link to section of paypal website to enter in WebGUI information)
|
||||
- fixed #10551: paypal (link to section of paypal website to enter in WebGUI information)
|
||||
- fixed #10550: shipping plugins have no privileges
|
||||
|
||||
7.7.10
|
||||
- Made a change to LDAP auth that adds an OR to that query so that it also searches for a row with fieldData REGEXP '^uid=(value-from-ldap-directory-server),'. (Wes Morgan)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ use Getopt::Long;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Shop::Ship;
|
||||
use WebGUI::Shop::ShipDriver;
|
||||
|
||||
|
||||
my $toVersion = '7.7.11';
|
||||
|
|
@ -33,6 +35,7 @@ my $session = start(); # this line required
|
|||
# upgrade functions go here
|
||||
setDefaultIcalInterval($session);
|
||||
makeSurveyResponsesVersionAware($session);
|
||||
addShipperGroupToUse($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -56,9 +59,25 @@ sub setDefaultIcalInterval {
|
|||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addShipperGroupToUse {
|
||||
my $session = shift;
|
||||
print "\tAdd Group to Use for all existing shipping drivers... " unless $quiet;
|
||||
my $ship = WebGUI::Shop::Ship->new($session);
|
||||
my $shippers = $ship->getShippers($session);
|
||||
foreach my $shipper (@{ $shippers }) {
|
||||
my $options = $shipper->get();
|
||||
$options->{groupToUse} = 7;
|
||||
$shipper->update($options);
|
||||
}
|
||||
# and here's our code
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub makeSurveyResponsesVersionAware {
|
||||
my $session = shift;
|
||||
print "\tAdding revisionDate column to Survey_response table... " unless $quiet;
|
||||
print "\tAdding revisionDate column to Survey_response table...\n" unless $quiet;
|
||||
$session->db->write("alter table Survey_response add column revisionDate bigint(20) not null default 0");
|
||||
|
||||
print "\tDefaulting revisionDate on existing responses to current latest revision... " unless $quiet;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue