Bug 9663 - Individual bibliographic record "Save" option requires export permission
authorOwen Leonard <oleonard@myacpl.org>
Tue, 19 Feb 2013 17:10:40 +0000 (12:10 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 1 Mar 2013 00:07:50 +0000 (19:07 -0500)
This patch corrects permission on the export option available on
catalogue pages in the staff client (detail.pl, MARCdetail.pl, etc) so
that users no longer require "export_catalogue" permission.
"export_catalogue" permission is required only for tools/export.pl.

This patch also corrects some crazy nearby indentation. Sorry, couldn't
resist.

To test, visit a page like detail.pl with and without "export_catalogue"
permission. It should be possible to save the record as MODS, MARCXML,
MARC, etc. without error.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
catalogue/export.pl

index 3a76084..26e189b 100755 (executable)
@@ -12,13 +12,13 @@ use CGI;
 
 my $query = new CGI;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
-                                                                     template_name   => "tools/export.tt",
-                                                                     query           => $query,
-                                                                     type            => "intranet",
-                                                                     authnotrequired => 0,
-                                                                     flagsrequired   => { tools => 'export_catalog' },
-                                                                     debug           => 1,
-                                                                     });
+    template_name   => "tools/export.tt",
+    query           => $query,
+    type            => "intranet",
+    authnotrequired => 0,
+    flagsrequired   => { catalogue => 1 },
+    debug           => 1,
+    });
 
 my $op=$query->param("op");
 my $format=$query->param("format");