Bugzilla – Attachment 27640 Details for
Bug 7673
New patron permissions to manage items (edit, batchmod, delete all)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7673: Change the superlibrarian check
Bug-7673-Change-the-superlibrarian-check.patch (text/plain), 2.03 KB, created by
Jonathan Druart
on 2014-04-25 14:58:48 UTC
(
hide
)
Description:
Bug 7673: Change the superlibrarian check
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-04-25 14:58:48 UTC
Size:
2.03 KB
patch
obsolete
>From 9a9475bd5dc0bda1df2c794cacff809d51e31e36 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 25 Apr 2014 16:57:58 +0200 >Subject: [PATCH] Bug 7673: Change the superlibrarian check > >To know if the user is a superlibrarian, we have to call >C4::Context->IsSuperLibrarian >--- > cataloguing/additem.pl | 2 +- > tools/batchMod.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 52f3ff6..5c82fb1 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -373,7 +373,7 @@ my ($template, $loggedinuser, $cookie) > my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef; > my $restrictededition = $uid ? haspermission($uid, {'editcatalogue' => 'edit_items_restricted'}) : undef; > # In case user is a superlibrarian, edition is not restricted >-$restrictededition = 0 if ($restrictededition != 0 && $restrictededition->{'superlibrarian'} eq 1); >+$restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibrarian()); > # In case user has fast cataloging permission (and we're in fast cataloging), edition is not restricted > $restrictededition = 0 if ($restrictededition != 0 && $frameworkcode eq 'FA' && haspermission($uid, {'editcatalogue' => 'fast_cataloging'})); > >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index c2d4ecc..e7d5f76 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -74,7 +74,7 @@ my ($template, $loggedinuser, $cookie) > my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef; > my $restrictededition = $uid ? haspermission($uid, {'tools' => 'items_batchmod_restricted'}) : undef; > # In case user is a superlibrarian, edition is not restricted >-$restrictededition = 0 if ($restrictededition != 0 && $restrictededition->{'superlibrarian'} eq 1); >+$restrictededition = 0 if ($restrictededition != 0 && C4::Context->IsSuperLibrarian()); > > my $today_iso = C4::Dates->today('iso'); > $template->param(today_iso => $today_iso); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7673
:
8714
|
9857
|
10360
|
12102
|
13004
|
16225
|
16239
|
16368
|
16371
|
23266
|
23267
|
23270
|
23271
|
26008
|
26009
|
26704
|
26705
|
26722
|
27631
|
27632
|
27633
|
27634
|
27635
|
27636
|
27637
|
27638
|
27640
|
27641
|
28007
|
28008
|
28009
|
28010
|
28011
|
28012
|
28013
|
28014
|
28015
|
29550
|
30910
|
30911
|
30912
|
30913
|
30914
|
30915
|
30916
|
30917
|
30918
|
30919
|
31010
|
31011
|
31012
|
31013
|
31015
|
31016
|
31017
|
31019
|
32200
|
32201
|
32215
|
32217
|
32219
|
32220
|
32222
|
32224
|
32225
|
32226
|
32227
|
32228
|
32928
|
32962
|
32993
|
33487