View | Details | Raw Unified | Return to bug 8435
Collapse All | Expand All

(-)a/installer/data/mysql/updatedatabase.pl (-1 / +1 lines)
Lines 6723-6729 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6723
    SetVersion ($DBversion);
6723
    SetVersion ($DBversion);
6724
}
6724
}
6725
6725
6726
$DBversion = "3.09.00.XXX";
6726
$DBversion = "XXX";
6727
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6727
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6728
    $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES(15, 'superserials', 'Manage subscriptions from any branch')");
6728
    $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES(15, 'superserials', 'Manage subscriptions from any branch')");
6729
    print "Upgrade to $DBversion done (Add superserials permission)\n";
6729
    print "Upgrade to $DBversion done (Add superserials permission)\n";
(-)a/serials/subscription-add.pl (-5 / +10 lines)
Lines 121-130 if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { Link Here
121
    }
121
    }
122
}
122
}
123
123
124
my $onlymine=C4::Context->preference('IndependantBranches') &&
124
my $userenv = C4::Context->userenv;
125
             C4::Context->userenv &&
125
my $onlymine =
126
             C4::Context->userenv->{flags} % 2 !=1 &&
126
     C4::Context->preference('IndependantBranches')
127
             C4::Context->userenv->{branch};
127
  && $userenv
128
  && $userenv->{flags} % 2 != 1
129
  && (
130
    not C4::Auth::haspermission( $userenv->{id}, { serials => 'superserials' } )
131
  )
132
  && $userenv->{branch};
133
128
my $branches = GetBranches($onlymine);
134
my $branches = GetBranches($onlymine);
129
my $branchloop;
135
my $branchloop;
130
for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %{$branches}) {
136
for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %{$branches}) {
131
- 

Return to bug 8435