MT 2050, Follow-up, Fast Cataloging
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Mon, 23 Nov 2009 13:44:51 +0000 (14:44 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 24 Nov 2009 09:05:10 +0000 (10:05 +0100)
Adds granular permissions for cataloging
Also adds a link from the circulation home to fast cataloging when fast cataloging is active

89 files changed:
acqui/fetch_sort_dropbox.pl
authorities/blinddetail-biblio-search.pl
catalogue/suggest.pl
cataloguing/addbiblio.pl
cataloguing/addbooks.pl
cataloguing/additem.pl
cataloguing/merge.pl
cataloguing/moveitem.pl
cataloguing/value_builder/macles.pl
cataloguing/value_builder/marc21_field_006.pl
cataloguing/value_builder/marc21_field_007.pl
cataloguing/value_builder/marc21_field_008.pl
cataloguing/value_builder/marc21_field_008_authorities.pl
cataloguing/value_builder/marc21_leader.pl
cataloguing/value_builder/marc21_leader_authorities.pl
cataloguing/value_builder/marc21_leader_book.pl
cataloguing/value_builder/marc21_leader_computerfile.pl
cataloguing/value_builder/marc21_leader_video.pl
cataloguing/value_builder/unimarc_field_010.pl
cataloguing/value_builder/unimarc_field_100.pl
cataloguing/value_builder/unimarc_field_105.pl
cataloguing/value_builder/unimarc_field_106.pl
cataloguing/value_builder/unimarc_field_110.pl
cataloguing/value_builder/unimarc_field_115a.pl
cataloguing/value_builder/unimarc_field_115b.pl
cataloguing/value_builder/unimarc_field_116.pl
cataloguing/value_builder/unimarc_field_117.pl
cataloguing/value_builder/unimarc_field_120.pl
cataloguing/value_builder/unimarc_field_121a.pl
cataloguing/value_builder/unimarc_field_121b.pl
cataloguing/value_builder/unimarc_field_122.pl
cataloguing/value_builder/unimarc_field_123a.pl
cataloguing/value_builder/unimarc_field_123d.pl
cataloguing/value_builder/unimarc_field_123e.pl
cataloguing/value_builder/unimarc_field_123f.pl
cataloguing/value_builder/unimarc_field_123g.pl
cataloguing/value_builder/unimarc_field_123i.pl
cataloguing/value_builder/unimarc_field_123j.pl
cataloguing/value_builder/unimarc_field_124.pl
cataloguing/value_builder/unimarc_field_124a.pl
cataloguing/value_builder/unimarc_field_124b.pl
cataloguing/value_builder/unimarc_field_124c.pl
cataloguing/value_builder/unimarc_field_124d.pl
cataloguing/value_builder/unimarc_field_124e.pl
cataloguing/value_builder/unimarc_field_124f.pl
cataloguing/value_builder/unimarc_field_124g.pl
cataloguing/value_builder/unimarc_field_125.pl
cataloguing/value_builder/unimarc_field_125a.pl
cataloguing/value_builder/unimarc_field_125b.pl
cataloguing/value_builder/unimarc_field_126.pl
cataloguing/value_builder/unimarc_field_126a.pl
cataloguing/value_builder/unimarc_field_126b.pl
cataloguing/value_builder/unimarc_field_127.pl
cataloguing/value_builder/unimarc_field_128a.pl
cataloguing/value_builder/unimarc_field_128b.pl
cataloguing/value_builder/unimarc_field_128c.pl
cataloguing/value_builder/unimarc_field_130.pl
cataloguing/value_builder/unimarc_field_135a.pl
cataloguing/value_builder/unimarc_field_140.pl
cataloguing/value_builder/unimarc_field_141.pl
cataloguing/value_builder/unimarc_field_210c.pl
cataloguing/value_builder/unimarc_field_225a.pl
cataloguing/value_builder/unimarc_field_4XX.pl
cataloguing/value_builder/unimarc_field_686a.pl
cataloguing/value_builder/unimarc_field_700-4.pl
cataloguing/value_builder/unimarc_leader.pl
circ/circulation-home.pl
installer/data/mysql/en/mandatory/userpermissions.sql
installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
koha-tmpl/intranet-tmpl/prog/en/includes/mainmenu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/400.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/401.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/402.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/403.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/404.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/405.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/errors/500.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tmpl
svc/authentication
svc/bib
svc/bib_profile
svc/new_bib

index e052db8..fa405f9 100755 (executable)
@@ -40,7 +40,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired => {editcatalogue => 1},
+        flagsrequired => {editcatalogue => 'edit_catalogue'},
         debug => 0,
     }
 );
index b137f50..c8896aa 100755 (executable)
@@ -67,7 +67,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $query,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { editcatalogue => 1 },
+        flagsrequired   => { editcatalogue => 'edit_catalogue' },
     }
 );
 
index 9463f85..55001ed 100755 (executable)
@@ -48,7 +48,7 @@ my ($template, $loggedinuser, $cookie)
                  query => $query,
                  type => "intranet",
                  authnotrequired => 0,
-                 flagsrequired => {editcatalogue => 1},
+                 flagsrequired => {editcatalogue => 'edit_catalogue'},
                  debug => 1,
                  });
 $template->param("loop" => \@loop_suggests,
index d05464c..3828950 100755 (executable)
@@ -830,6 +830,8 @@ my $mode          = $input->param('mode');
 my $frameworkcode = $input->param('frameworkcode');
 my $dbh           = C4::Context->dbh;
 
+my $userflags = ($frameworkcode eq 'FA') ? "fast_cataloging" : "edit_catalogue";
+
 $frameworkcode = &GetFrameworkCode($biblionumber)
   if ( $biblionumber and not($frameworkcode) );
 
@@ -840,7 +842,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { editcatalogue => 1 },
+        flagsrequired   => { editcatalogue => $userflags },
     }
 );
 
index 8ee8868..e911391 100755 (executable)
@@ -49,7 +49,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { editcatalogue => 1 },
+        flagsrequired   => { editcatalogue => 'edit_catalogue' },
         debug           => 1,
     }
 );
index d61892d..dbcb077 100755 (executable)
@@ -75,16 +75,27 @@ my $biblionumber = $input->param('biblionumber');
 my $itemnumber   = $input->param('itemnumber');
 my $op           = $input->param('op');
 
+my $frameworkcode = &GetFrameworkCode($biblionumber);
+
+# Defining which userflag is needing according to the framework currently used
+my $userflags;
+if (defined $input->param('frameworkcode')) {
+    $userflags = ($input->param('frameworkcode') eq 'FA') ? "fast_cataloging" : "edit_catalogue";
+}
+
+if (not defined $userflags) {
+    $userflags = ($frameworkcode eq 'FA') ? "fast_cataloging" : "edit_catalogue";
+}
+
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "cataloguing/additem.tmpl",
                  query => $input,
                  type => "intranet",
                  authnotrequired => 0,
-                 flagsrequired => {editcatalogue => 1},
+                 flagsrequired => {editcatalogue => $userflags},
                  debug => 1,
                  });
 
-my $frameworkcode = &GetFrameworkCode($biblionumber);
 
 my $today_iso = C4::Dates->today('iso');
 $template->param(today_iso => $today_iso);
index 2aaddcd..be84df5 100755 (executable)
@@ -39,7 +39,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { editcatalogue => 1 },
+        flagsrequired   => { editcatalogue => 'edit_catalogue' },
     }
 );
 
index 0186435..1548b60 100755 (executable)
@@ -47,7 +47,7 @@ my ($template, $loggedinuser, $cookie)
                  query => $query,
                  type => "intranet",
                  authnotrequired => 0,
-                 flagsrequired => {editcatalogue => 1},
+                 flagsrequired => {editcatalogue => 'edit_catalogue'},
                  debug => 1,
                  });
 
index bd684c4..738ae1e 100755 (executable)
@@ -176,7 +176,7 @@ my ($input) = @_;
                     query => $input,
                     type => "intranet",
                     authnotrequired => 0,
-                    flagsrequired => {editcatalogue => 1},
+                    flagsrequired => {editcatalogue => '*'},
                     debug => 1,
                     });
     $template->param(BIGLOOP=>\@BIGLOOP);
index 506f742..ecdb9c6 100755 (executable)
@@ -75,7 +75,7 @@ sub plugin {
             query           => $input,
             type            => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );
index 9969f29..a6b3c55 100755 (executable)
@@ -76,7 +76,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        $result = "ta" unless $result;
index 7d4d2b8..fcb2844 100755 (executable)
@@ -88,7 +88,7 @@ sub plugin {
             query           => $input,
             type            => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );
index 1aae045..3f45dbf 100755 (executable)
@@ -84,7 +84,7 @@ sub plugin {
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        $result = "$dateentered".'|| aca||aabn           | a|a     d' unless $result;
index 2598be7..d0b54ab 100755 (executable)
@@ -78,7 +78,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        $result = "     nam a22     7a 4500" unless $result;
index 2ad0247..5dce0d1 100755 (executable)
@@ -78,7 +78,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        $result = "     nz  a22     n  4500" unless $result;
index 137d031..0e74f87 100755 (executable)
@@ -75,7 +75,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        $result = "     nam         7a      " unless $result;
index 9f3de1b..20e02bf 100755 (executable)
@@ -75,7 +75,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        $result = "     nmm         7a      " unless $result;
index 7e445aa..d787f19 100755 (executable)
@@ -75,7 +75,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        $result = "     ngm         7a      " unless $result;
index f4f4511..2e91631 100755 (executable)
@@ -82,7 +82,7 @@ sub plugin {
                                     query => $input,
                                     type => "intranet",
                                     authnotrequired => 0,
-                                    flagsrequired => {editcatalogue => 1},
+                                    flagsrequired => {editcatalogue => '*'},
                                     debug => 1,
                                     });
 
index 088cf21..e930d70 100755 (executable)
@@ -77,7 +77,7 @@ sub plugin {
             query         => $input,
             type          => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );
index e33e128..c84277b 100755 (executable)
@@ -72,7 +72,7 @@ sub plugin {
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index b7165ce..bf2573b 100755 (executable)
@@ -70,7 +70,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 1ef4006..26dc4a9 100755 (executable)
@@ -70,7 +70,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 05b6912..7fd96dc 100755 (executable)
@@ -79,7 +79,7 @@ sub plugin {
             query           => $input,
             type            => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );
index 77f07e5..65502e0 100755 (executable)
@@ -73,7 +73,7 @@ sub plugin {
             query           => $input,
             type            => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );
index d9f2e95..ade4d14 100755 (executable)
@@ -72,7 +72,7 @@ sub plugin {
             query         => $input,
             type          => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );
index 917acff..dc34e82 100755 (executable)
@@ -69,7 +69,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,2);
index 28bcbcf..9478d91 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 934e29d..0880e7c 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 2fad82f..4fdbb99 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index ec60a99..5b7220d 100755 (executable)
@@ -73,7 +73,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 8554d0e..afd9d95 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index e9ecd49..e9caa86 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index e9ecd49..e9caa86 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 67b61e6..4aeed6e 100755 (executable)
@@ -73,7 +73,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index e9ecd49..e9caa86 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index cf56999..4303634 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 4d61ef7..175e60f 100755 (executable)
@@ -76,7 +76,7 @@ sub plugin {
                        query => $input,
                        type => "intranet",
                        authnotrequired => 0,
-                       flagsrequired => {editcatalogue => 1},
+                       flagsrequired => {editcatalogue => '*'},
                        debug => 1,
                }
        );
index c98f87a..4a57b17 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,8);
index afd6146..8c7d097 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index b00ebf7..f2e16ed 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 291ed1e..387746b 100755 (executable)
@@ -73,7 +73,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 5191dd7..c1837a3 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index c19999d..13a6d53 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 3a00ba0..79a9082 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,2);
index 146459d..9837f95 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,2);
index c98f87a..4a57b17 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,8);
index 37e238d..fec59fb 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index d95eea5..5566e6f 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index c98f87a..4a57b17 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,8);
index a0c178c..c7ca107 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index a3d444a..55e1ce6 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 18e2758..00b0e96 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,2);
index c260e9f..47933a6 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,2);
index c0a6c1d..f1a836a 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,2);
index 3bda1b1..4b67071 100755 (executable)
@@ -73,7 +73,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,2);
index 6d8b47e..1c1566b 100755 (executable)
@@ -73,7 +73,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index cc94b67..1a8fabf 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 5de380c..8619494 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index be08047..56a8cae 100755 (executable)
@@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {editcatalogue => 1},
+                            flagsrequired => {editcatalogue => '*'},
                             debug => 1,
                             });
        my $f1 = substr($result,0,1);
index 995debd..6673658 100755 (executable)
@@ -140,7 +140,7 @@ my ($input) = @_;
                     query => $query,
                     type => 'intranet',
                     authnotrequired => 0,
-                    flagsrequired => {editcatalogue => 1},
+                    flagsrequired => {editcatalogue => '*'},
                     debug => 1,
                     });
     
@@ -202,7 +202,7 @@ my ($input) = @_;
                     query => $query,
                     type => 'intranet',
                     authnotrequired => 0,
-                    flagsrequired => {editcatalogue => 1},
+                    flagsrequired => {editcatalogue => '*'},
                     debug => 1,
                     });
     
index f81b5be..a02910e 100755 (executable)
@@ -116,7 +116,7 @@ sub plugin {
             query           => $input,
             type            => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );
index 195fb5c..58a82bf 100755 (executable)
@@ -95,7 +95,7 @@ sub plugin {
                 query           => $query,
                 type            => "intranet",
                 authnotrequired => 0,
-                flagsrequired   => { editcatalogue => 1 },
+                flagsrequired   => { editcatalogue => '*' },
                 debug           => 1,
             }
         );
index 8d04df9..ac41c9b 100644 (file)
@@ -79,7 +79,7 @@ my ($input) = @_;
                                        query => $input,
                                        type => "intranet",
                                        authnotrequired => 0,
-                                       flagsrequired => {editcatalogue => 1},
+                                       flagsrequired => {editcatalogue => '*'},
                                        debug => 1,
                                        });
        $template->param(index => $index,
index a2f3f51..ae8772a 100755 (executable)
@@ -87,7 +87,7 @@ my ($input) = @_;
                                        query => $input,
                                        type => "intranet",
                                        authnotrequired => 0,
-                                       flagsrequired => {editcatalogue => 1},
+                                       flagsrequired => {editcatalogue => '*'},
                                        debug => 1,
                                        });
        $template->param(index => $index,
index 260f560..a1a0449 100755 (executable)
@@ -77,7 +77,7 @@ sub plugin {
             query           => $input,
             type            => "intranet",
             authnotrequired => 0,
-            flagsrequired   => { editcatalogue => 1 },
+            flagsrequired   => { editcatalogue => '*' },
             debug           => 1,
         }
     );
index 4ac5267..2ebd0d0 100755 (executable)
@@ -21,7 +21,7 @@ use CGI;
 use C4::Auth;
 use C4::Output;
 use C4::Context;
-
+use C4::Koha;
 
 my $query = new CGI;
 my ($template, $loggedinuser, $cookie)
@@ -32,4 +32,9 @@ my ($template, $loggedinuser, $cookie)
                                flagsrequired => {circulate => "circulate_remaining_permissions"},
                                });
 
+# Checking if there is a Fast Cataloging Framework
+my $fa = getframeworkinfo('FA');
+$template->param({ fast_cataloging => 1 }) if (defined $fa);
+
+
 output_html_with_http_headers $query, $cookie, $template->output;
index 3ae0953..a8c37d3 100644 (file)
@@ -1,6 +1,8 @@
 INSERT INTO permissions (module_bit, code, description) VALUES
    ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
    ( 1, 'override_renewals', 'Override blocked renewals'),
+   ( 9, 'edit_catalogue', 'Edit catalogue'),
+   ( 9, 'fast_cataloging', 'Fast cataloging'),
    (11, 'vendors_manage', 'Manage vendors'),
    (11, 'contracts_manage', 'Manage contracts'),
    (11, 'period_manage', 'Manage periods'),
index 87c857f..d1b826e 100644 (file)
@@ -1,6 +1,8 @@
 INSERT INTO permissions (module_bit, code, description) VALUES
    ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
    ( 1, 'override_renewals', 'Override blocked renewals'),
+   ( 9, 'edit_catalogue', 'Editer le  catalogue'),
+   ( 9, 'fast_cataloging', 'Catalogage rapide'),
    (13, 'edit_news', 'Write news for the OPAC and staff interfaces'),
    (13, 'label_creator', 'Create printable labels and barcodes from catalog and patron data'),
    (13, 'edit_calendar', 'Define days when the library is closed'),
index a562269..ea7f84a 100755 (executable)
@@ -3291,6 +3291,18 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+$DBversion = "3.01.00.128";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+       $dbh->do(qq{
+               INSERT INTO `permissions` (`module_bit`, `code`, `description`) VALUES
+                (9, 'edit_catalogue', 'Edit catalogue'),
+               (9, 'fast_cataloging', 'Fast cataloging')
+       });
+       
+    print "Upgrade to $DBversion done (granular permissions for cataloging added)\n";
+    SetVersion ($DBversion);
+}
+
 =item DropAllForeignKeys($table)
 
   Drop all foreign keys of the table $table
index a9da9f8..b26bc57 100644 (file)
@@ -2,7 +2,7 @@
        
        <script type="text/javascript">
        //<![CDATA[
-       <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+       <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
        /* this function open a popup to search on z3950 server.  */
        function PopupZ3950() {
                var strQuery = GetZ3950Terms();
@@ -156,7 +156,7 @@ function confirm_items_deletion() {
 <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();">
 
 <ul class="toolbar">
-       <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+       <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
        <li id="newmenuc"><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New Record</a></li>
        <li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">New Item</a></li>
        <li><a id="newsub" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=<!-- TMPL_VAR NAME="biblionumber" -->">New Subscription</a></li>
@@ -171,7 +171,7 @@ function confirm_items_deletion() {
         <!-- TMPL_UNLESS name="bi_notforloan" -->
        <!-- TMPL_UNLESS NAME="norequests" --><li><a id="placehold" href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS -->
        <!-- /TMPL_IF -->
-       <!-- TMPL_IF NAME="CAN_user_editcatalogue" --><li id="z3950searchc"><input type="button" id="z3950search" value="z39.50 Search" onclick="PopupZ3950(); return false;" /></li><!-- /TMPL_IF -->
+       <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --><li id="z3950searchc"><input type="button" id="z3950search" value="z39.50 Search" onclick="PopupZ3950(); return false;" /></li><!-- /TMPL_IF -->
     </ul>
 </form>
 </div>
index 42f8c23..b8b33e5 100644 (file)
@@ -13,7 +13,7 @@
                         <div class="bd">
                             <ul>
                             <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a></li>
-                            <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+                            <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
                             <li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></li>
                             <!-- /TMPL_IF -->
                             <!-- TMPL_IF NAME="CAN_user_acquisition" -->
index 46a0191..9d41cab 100644 (file)
@@ -43,7 +43,7 @@
                 </ul></li>
                 
                 <!-- /TMPL_IF -->
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a><ul>
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
         <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
index a2f990e..fada624 100644 (file)
@@ -42,7 +42,7 @@
     <!-- TMPL_LOOP NAME="ITEM_DATA" -->
     <div class="yui-g">
         <h3 id="item<!-- TMPL_VAR NAME="itemnumber" -->">Barcode <!-- TMPL_VAR NAME="barcode" -->  <!-- TMPL_IF name="notforloantext" --><!-- TMPL_VAR name="notforloantext" --> <!-- /TMPL_IF --></h3>
-        <div class="listgroup"><h4>Item Information <!-- TMPL_IF NAME="CAN_user_editcatalogue" --><!-- TMPL_UNLESS name="nomod" --><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">[Edit Items]</a><!-- /TMPL_IF --><!-- /TMPL_UNLESS --></h4>
+        <div class="listgroup"><h4>Item Information <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --><!-- TMPL_UNLESS name="nomod" --><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber"-->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">[Edit Items]</a><!-- /TMPL_IF --><!-- /TMPL_UNLESS --></h4>
             <ol class="bibliodetails">
             <li><span class="label">Home Library:</span> <!-- TMPL_VAR NAME="homebranchname" -->&nbsp;</li>
            <!-- TMPL_IF NAME="item-level_itypes" -->
             <ol class="bibliodetails">
 
                 <li><span class="label">
-                <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+                <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
                     Accession Date:</span> <a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="dateaccessioned" --></a>
                 <!-- TMPL_ELSE -->
                     <!-- TMPL_VAR NAME="dateaccessioned" -->
index 89ea282..9650adb 100644 (file)
@@ -236,7 +236,7 @@ function GetZ3950Terms(){
                 <!-- /TMPL_IF -->
                <span class="addto"></span>
 
-                               <!-- TMPL_IF NAME="CAN_user_editcatalogue" --><input type="button" onclick="PopupZ3950(); return false;" value="z39.50 Search"/><!-- /TMPL_IF -->
+                               <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --><input type="button" onclick="PopupZ3950(); return false;" value="z39.50 Search"/><!-- /TMPL_IF -->
             </div>
         </div>
     <!-- TMPL_IF NAME="stopwords_removed" --><div><p class="tip">Ignored the following common words: "<!-- TMPL_VAR NAME="stopwords_removed" -->"<p></div><!-- /TMPL_IF -->
index 7935ce4..ff09a92 100644 (file)
@@ -98,7 +98,7 @@
                 </td>
                                <td> <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=<!-- TMPL_VAR NAME="biblionumber" -->" title="MARC" rel="gb_page_center[600,500]">Card</a>
                 </td>
-                <td><!-- TMPL_IF NAME="CAN_user_editcatalogue"--><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit biblio</a>
+                <td><!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue"--><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit biblio</a>
                                        <!-- TMPL_ELSE --><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" class="disabled" onclick="return false;">Edit biblio</a>
                                        <!-- /TMPL_IF -->
                     
                                </td>
                 <td><!-- TMPL_IF NAME="NOTMARC" -->
                 <!-- TMPL_ELSE -->
-                       <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?breedingid=<!-- TMPL_VAR NAME="id" -->" <!-- TMPL_UNLESS NAME="CAN_user_editcatalogue" --> class="disabled" onclick="return false;"<!-- /TMPL_UNLESS -->>Add biblio</a>
+                       <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?breedingid=<!-- TMPL_VAR NAME="id" -->" <!-- TMPL_UNLESS NAME="CAN_user_editcatalogue_edit_catalogue" --> class="disabled" onclick="return false;"<!-- /TMPL_UNLESS -->>Add biblio</a>
                 <!-- /TMPL_IF --></td>
             </tr>
             <!-- /TMPL_LOOP -->
index 884b0dc..54f6d57 100644 (file)
                <li><a href="/cgi-bin/koha/circ/returns.pl">Check In</a></li>
                <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
        <!-- TMPL_IF NAME="AutoLocation" --><!-- TMPL_ELSE --><!-- TMPL_IF NAME="IndependantBranches" --><!-- TMPL_ELSE --><li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li><!-- /TMPL_IF --><!-- /TMPL_IF -->
+       <!-- TMPL_IF NAME="fast_cataloging" -->
+           <!-- TMPL_IF NAME="CAN_user_editcatalogue_fast_cataloging" -->
+               <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA">Fast cataloging</a></li>
+           <!-- /TMPL_IF -->
+       <!-- /TMPL_IF -->
        </ul>
        </div>
 
index f084008..40f5087 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="yui-u">
 
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;">
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
index 5768f8f..8bf2c8f 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="yui-u">
 
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;">
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
index 3f24940..2dbbf8d 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="yui-u">
 
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;">
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
index 9eea449..8c78256 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="yui-u">
 
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;">
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
index 9e0db0f..2bd1f0d 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="yui-u">
 
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;">
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
index 82af9a0..928e430 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="yui-u">
 
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;">
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
index c719c9e..adf4e2b 100644 (file)
@@ -70,7 +70,7 @@
 
 <div class="yui-u">
 
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul style="margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #CCC;">
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
index ce69c63..1751075 100644 (file)
@@ -54,7 +54,7 @@
        </div>
        
        <div class="yui-u">
-    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
+    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
     <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul>
         <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
index f239a15..b9d3047 100755 (executable)
@@ -43,7 +43,7 @@ my $query = new CGI;
 # web browser, but instead should be stored and submitted by biblios.
 
 
-my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 1} );
+my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
 
 if ($status eq "ok") {
     print $query->header(-type => 'text/xml', cookie => $cookie);
diff --git a/svc/bib b/svc/bib
index 14c6066..ac7e4b0 100755 (executable)
--- a/svc/bib
+++ b/svc/bib
@@ -29,7 +29,7 @@ use XML::Simple;
 my $query = new CGI;
 binmode STDOUT, ":utf8";
 
-my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 1} );
+my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
 unless ($status eq "ok") {
     print $query->header(-type => 'text/xml', -status => '403 Forbidden');
     print XMLout({ auth_status => $status }, NoAttr => 1, RootName => 'response', XMLDecl => 1);
index a62e7e0..c6153ea 100755 (executable)
@@ -29,7 +29,7 @@ use XML::Simple;
 
 my $query = new CGI;
 
-my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 1} );
+my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
 
 if ($status eq "ok") {
     print $query->header(-type => 'text/xml', cookie => $cookie);
index e4b4ce9..32748fb 100755 (executable)
@@ -30,7 +30,7 @@ use C4::Charset;
 my $query = new CGI;
 binmode STDOUT, ":utf8";
 
-my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 1} );
+my ($status, $cookie, $sessionID) = check_api_auth($query, { editcatalogue => 'edit_catalogue'} );
 unless ($status eq "ok") {
     print $query->header(-type => 'text/xml', -status => '403 Forbidden');
     print XMLout({ auth_status => $status }, NoAttr => 1, RootName => 'response', XMLDecl => 1);