Skip to content
Browse files

Followup to deleted records: add missing permission for accessing sta…

…ff client.

Also repairs errors in updatedatabase.pl ( testing against Version instead of LibLimeVersion ).
  • Loading branch information...
1 parent 2627df0 commit 179af4550a0ddf5041c7a95ae5ad85accda021f4 Ryan Higgins committed Mar 23, 2010
View
2 catalogue/ISBDdetail.pl
@@ -62,7 +62,7 @@ =head1 FUNCTIONS
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { catalogue => 1 },
+ flagsrequired => { catalogue => 'access' },
}
);
View
2 catalogue/MARCdetail.pl
@@ -80,7 +80,7 @@ =head1 FUNCTIONS
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { catalogue => 1 },
+ flagsrequired => { catalogue => 'access' },
debug => 1,
}
);
View
2 catalogue/detail.pl
@@ -48,7 +48,7 @@
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { catalogue => 1 },
+ flagsrequired => { catalogue => 'access' },
}
);
View
2 catalogue/detailprint.pl
@@ -69,7 +69,7 @@
query => $query,
type => "intranet",
authnotrequired => ( $type eq 'opac' ),
- flagsrequired => { catalogue => 1 },
+ flagsrequired => { catalogue => 'access' },
}
);
View
2 catalogue/labeledMARCdetail.pl
@@ -46,7 +46,7 @@
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { catalogue => 1 },
+ flagsrequired => { catalogue => 'access' },
debug => 1,
}
);
View
2 catalogue/search.pl
@@ -171,7 +171,7 @@ =head3 Additional Notes
query => $cgi,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { catalogue => 1 },
+ flagsrequired => { catalogue => 'access' },
}
);
if (C4::Context->preference("marcflavour") eq "UNIMARC" ) {
View
2 catalogue/showmarc.pl
@@ -50,7 +50,7 @@
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => { catalogue => 1 },
+ flagsrequired => { catalogue => 'access' },
debug => 1,
}
);
View
1 installer/data/mysql/en/mandatory/userpermissions.sql
@@ -6,6 +6,7 @@ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
(1, 'remove_coursereserves', 'Take items off course reserve'),
(1, 'checkout_via_proxy', 'Checkout via Proxy'),
(2, 'search_deleted', 'Search deleted bibliographic records'),
+ (2, 'access', 'Access staff client & search functions'),
(4, 'borrowers_remaining_permissions', 'Remaining Borrowers Permissions'),
(4, 'create_proxy_relationships', 'Create Proxy Relationships'),
(4, 'edit_proxy_relationships', 'Edit Proxy Relationships'),
View
17 installer/data/mysql/updatedatabase.pl
@@ -3617,44 +3617,51 @@
}
$DBversion = "4.02.00.007";
-if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+if (C4::Context->preference("LibLimeVersion") < TransformToNum($DBversion)) {
$dbh->do("CREATE INDEX `datecreated` ON auth_header (`datecreated`) ");
$dbh->do("CREATE INDEX `datemodified` ON auth_header (`datemodified`) ");
SetLibLimeVersion ($DBversion);
print "Upgrade to $DBversion done (Add indexes on auth_header table: datecreated and datemodified )\n";
}
$DBversion = "4.02.00.008";
-if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+if (C4::Context->preference("LibLimeVersion") < TransformToNum($DBversion)) {
$dbh->do("CREATE INDEX `itemissues` ON old_issues (`itemnumber`, `returndate`) ");
SetLibLimeVersion ($DBversion);
print "Upgrade to $DBversion done (Add index on old_issues table to improve performance of oft-called GetItemsInfo )\n";
}
$DBversion = "4.02.00.009";
-if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+if (C4::Context->preference("LibLimeVersion") < TransformToNum($DBversion)) {
$dbh->do("insert ignore into accounttypes (accounttype, description, class ) VALUES ( 'RENEWCARD','Renew Patron Account','fee' )");
SetLibLimeVersion ($DBversion);
print "Upgrade to $DBversion done ( Add RENEWCARD accounttype if it was missing. (You may safely ignore an error here) )\n";
}
$DBversion = "4.02.00.010";
-if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+if (C4::Context->preference("LibLimeVersion") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE items CHANGE itemcallnumber itemcallnumber varchar(100) default NULL");
$dbh->do("ALTER TABLE deleteditems CHANGE itemcallnumber itemcallnumber varchar(100) default NULL");
SetLibLimeVersion ($DBversion);
print "Upgrade to $DBversion done ( Ensure itemcallnumber is 100 characters limit rather than 30 )\n";
}
$DBversion = "4.02.00.011";
-if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+if (C4::Context->preference("LibLimeVersion") < TransformToNum($DBversion)) {
$dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES
(9, 'batch_item_edit', 'Batch Item Edit'),
(9, 'batch_item_delete', 'Batch Item Delete')");
SetLibLimeVersion ($DBversion);
print "Upgrade to $DBversion done ( New permissions for Batch Edit and Deletion of items )\n";
}
+$DBversion = "4.02.00.012";
+if (C4::Context->preference("LibLimeVersion") < TransformToNum($DBversion)) {
+ $dbh->do(" INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (2, 'access', 'Access staff client & search functions') ");
+ SetLibLimeVersion ($DBversion);
+ print "Upgrade to $DBversion done ( Add missing permissions for core staff client access after deleted records addition )\n";
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
View
7 mainpage.pl
@@ -46,16 +46,11 @@
query => $query,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {
- catalogue => 1,
- },
+ flagsrequired => { catalogue => 'access' },
}
);
-my $marc_p = C4::Context->boolean_preference("marc");
-
$template->param(
- NOTMARC => !$marc_p,
authtypesloop => \@authtypesloop
);

0 comments on commit 179af45

Please sign in to comment.
Something went wrong with that request. Please try again.