Bug 7995 - upload patron images permission needed to upload offline circ
Summary: upload patron images permission needed to upload offline circ
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-23 12:36 UTC by Nicole C. Engard
Modified: 2015-06-04 23:23 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2012-04-23 12:36:54 UTC
It seems that you need the permission to upload patron images in order to upload the offline circ files. Is anyone else experiencing this? Do we need a different permission for the offline circ file? Or should the circ permissions be enough for that?
Comment 1 Albert Oller 2012-06-19 16:50:13 UTC
Hi, 

same problem with 3.8

missing unzip fixed with : sudo apt-get install unzip

current 3.8 picture-upload.pl gives this error:

Patron image failed to upload

    Unpacking completed
    1 directories scanned.
    1 directories processed.

    - Cardnumber:
    WARNING: This image not imported because the cardnumber and filename is missing.

installed the older picture-upload.pl and it now works fine.


Here's the diff of the two:  (picture-upload.pl.orig = 3.8 version)

kohaclone/tools$ diff picture-upload.pl picture-upload.pl.orig 
61c61
< picture-upload.p. - Script for handling uploading of both single and bulk patronimages and importing them into the database.
---
> picture-upload.pl - Script for handling uploading of both single and bulk patronimages and importing them into the database.
81c81,84
<     my $filesuffix = $1 if $uploadfilename =~ m/(\..+)$/i;
---
>     my $filesuffix;
>     if ( $uploadfilename =~ m/(\..+)$/i ) {
>         my $filesuffix = $1;
>     }
98c101
<             unless (system("unzip $tempfile -d $dirname") == 0) {
---
>             unless (system("unzip", $tempfile,  '-d', $dirname) == 0) {
257,258c260,264
< 				my $dberror = PutPatronImage($cardnumber,$mimetype, $imgfile) if $mimetype;
< 				if ( !$dberror && $mimetype ) { # Errors from here on are fatal only to the import of a particular image, so don't bail, just note the error and keep going
---
>                 my $dberror;
>                 if ($mimetype) {
>                     $dberror = PutPatronImage( $cardnumber, $mimetype, $imgfile );
>                 }
>                 if ( !$dberror && $mimetype ) { # Errors from here on are fatal only to the import of a particular image, so don't bail, just note the error and keep going
298,299d303
< 
< =back
Comment 2 Albert Oller 2012-06-19 16:57:37 UTC
Hi,

Please disregard comment #2, I posted to the wrong bug.

sorry about that.
Comment 3 Kyle M Hall (khall) 2012-10-01 13:17:59 UTC
Is this still a valid bug? I'm having trouble recreating the issue.
Comment 4 Nicole C. Engard 2012-10-01 13:26:54 UTC
I don't remember why I reported this ... :)
Comment 5 Nicole C. Engard 2014-06-10 17:06:58 UTC
Got this via email:
------------

Please re-open this ticket. I have confirmed that the batch_upload_patron_images permission still has to be active for an account to upload offline files. We either need to

A) update help files to reflect this
2) attach this feature to a more appropriate permission
iii) rename the permission to something less specific (like upload_files)
Comment 6 Katrin Fischer 2014-11-10 22:32:08 UTC
I checked this on current master - all offlince-circulation related files have "circulate_remaining_permissions" as required flag. I think this has been fixed:

http://git.koha-community.org/gitweb/?p=koha.git;a=commit;h=5880522ea74e803e41a5efab88dca0efb66f4358