Lines 75-80
sub add {
Link Here
|
75 |
my $notes = $body->{notes}; |
75 |
my $notes = $body->{notes}; |
76 |
my $hold_date = $body->{hold_date}; |
76 |
my $hold_date = $body->{hold_date}; |
77 |
|
77 |
|
|
|
78 |
my $disallow_override = $body->{_disallow_override}; |
79 |
|
78 |
if(!C4::Context->preference( 'AllowHoldDateInFuture' ) && $hold_date) { |
80 |
if(!C4::Context->preference( 'AllowHoldDateInFuture' ) && $hold_date) { |
79 |
return $c->render( |
81 |
return $c->render( |
80 |
status => 400, |
82 |
status => 400, |
Lines 132-138
sub add {
Link Here
|
132 |
? C4::Reserves::CanItemBeReserved( $patron_id, $item_id ) |
134 |
? C4::Reserves::CanItemBeReserved( $patron_id, $item_id ) |
133 |
: C4::Reserves::CanBookBeReserved( $patron_id, $biblio_id ); |
135 |
: C4::Reserves::CanBookBeReserved( $patron_id, $biblio_id ); |
134 |
|
136 |
|
135 |
my $can_override = C4::Context->preference('AllowHoldPolicyOverride'); |
137 |
my $can_override = $disallow_override ? 0 : C4::Context->preference('AllowHoldPolicyOverride'); |
136 |
|
138 |
|
137 |
unless ($can_override || $can_place_hold->{status} eq 'OK' ) { |
139 |
unless ($can_override || $can_place_hold->{status} eq 'OK' ) { |
138 |
return $c->render( |
140 |
return $c->render( |