From: Matthias Meusburger Date: Thu, 11 Feb 2010 13:33:54 +0000 (+0100) Subject: MT2938 : Adds a permission for editing items X-Git-Tag: v3.00.06~62 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;ds=sidebyside;h=aab4cf45cc007c1504d4ade82a797e7fb92b3ee3;p=koha.git MT2938 : Adds a permission for editing items --- diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index 7b0b673727..f270ddffa2 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -57,6 +57,7 @@ for ($damaged,$itemlost,$wthdrawn) { # modify MARC item if input differs from items table. my $item_changes = {}; if (defined $itemnotes) { # i.e., itemnotes parameter passed from form + my ($loggedinuser, $cookie, $sessionID) = checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); if ((not defined $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) { $item_changes->{'itemnotes'} = $itemnotes; } diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index e4c30e34a9..f91e3525eb 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -70,7 +70,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {editcatalogue => 1}, + flagsrequired => {editcatalogue => 'edit_items'}, debug => 1, }); diff --git a/installer/data/mysql/updatedatabase30.pl b/installer/data/mysql/updatedatabase30.pl index 9c5a9e6aba..4097e568fa 100644 --- a/installer/data/mysql/updatedatabase30.pl +++ b/installer/data/mysql/updatedatabase30.pl @@ -738,6 +738,13 @@ if (C4::Context->preference('Version') < TransformToNum($DBversion)){ SetVersion ($DBversion); } +$DBversion = '3.00.06.007'; +if (C4::Context->preference('Version') < TransformToNum($DBversion)){ + $dbh->do("INSERT INTO `permissions` (`module_bit` , `code` , `description`) VALUES ('9', 'edit_items', 'Edit items');"); + print "Upgrade to $DBversion done (Added 'Edit Items' permission)\n"; + SetVersion ($DBversion); +} + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl index 0026405f99..a4d58a927b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl @@ -153,7 +153,7 @@
  • Previous Borrower: "> 
  • Paid for?:  
  • Public Note: - +
    " /> " />" /> diff --git a/kohaversion.pl b/kohaversion.pl index 5dd8831fcb..24e2092a28 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.00.06.006'; + our $VERSION = '3.00.06.007'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install