[Koha-patches] [PATCH] renamed CheckSpecificUserPermissions to GranularPermissions
Galen Charlton
galen.charlton at liblime.com
Thu Apr 10 18:37:49 CEST 2008
---
C4/Auth.pm | 6 +++---
admin/systempreferences.pl | 2 +-
installer/data/mysql/en/mandatory/sysprefs.sql | 2 +-
.../1-Obligatoire/unimarc_standard_systemprefs.sql | 2 +-
installer/data/mysql/updatedatabase.pl | 4 ++--
members/member-flags.pl | 4 ++--
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index 5c69ab3..8ad1470 100755
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -191,7 +191,7 @@ sub get_template_and_user {
}
}
- if (C4::Context->preference('CheckSpecificUserPermissions')) {
+ if (C4::Context->preference('GranularPermissions')) {
if ( $flags ) {
foreach my $module (keys %$all_perms) {
if ( $flags->{$module} == 1) {
@@ -357,7 +357,7 @@ that the user must have the "circulate" privilege in order to
proceed. To make sure that access control is correct, the
C<$flagsrequired> parameter must be specified correctly.
-If the CheckSpecificUserPermissions system preference is ON, the
+If the GranularPermissions system preference is ON, the
value of each key in the C<flagsrequired> hash takes on an additional
meaning, e.g.,
@@ -1335,7 +1335,7 @@ sub haspermission {
}
return $flags if $flags->{superlibrarian};
foreach my $module ( keys %$flagsrequired ) {
- if (C4::Context->preference('CheckSpecificUserPermissions')) {
+ if (C4::Context->preference('GranularPermissions')) {
my $subperm = $flagsrequired->{$module};
if ($subperm eq '*') {
return 0 unless ( $flags->{$module} == 1 or ref($flags->{$module}) );
diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
index 84d134b..58a2cb2 100755
--- a/admin/systempreferences.pl
+++ b/admin/systempreferences.pl
@@ -82,7 +82,7 @@ my %tabsysprefs;
$tabsysprefs{SessionStorage}="Admin";
$tabsysprefs{noItemTypeImages}="Admin";
$tabsysprefs{OPACBaseURL}="Admin";
- $tabsysprefs{CheckSpecificUserPermissions}="Admin";
+ $tabsysprefs{GranularPermissions}="Admin";
# Authorities
$tabsysprefs{authoritysep}="Authorities";
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index b7642ea..dc384f4 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -182,4 +182,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACItemHolds','1','Allow OPAC users to place hold on specific items. If OFF, users can only request next available copy.','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('CheckSpecificUserPermissions','0','Check most specific staff user permissions',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GranularPermissions','0','Use detailed staff user permissions',NULL,'YesNo');
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index 647c9a5..f3af63c 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -183,4 +183,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('CircControl',"ItemHomeLibrary",'Précise la bibliothèque qui contrôle les règles de prêt et d''amende',"PickupLibrary|PatronLibrary|ItemHomeLibrary",'Choice');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACItemHolds','1','Si activé, les adhérents peuvent placer des réservations sur un exemplaire spécifique. Sinon, il ne peuvent que réserver le prochain disponible.','','YesNo');
-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('CheckSpecificUserPermissions','0','Check most specific staff user permissions',NULL,'YesNo');
+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GranularPermissions','0','Use detailed staff user permissions',NULL,'YesNo');
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 58e7a45..240b37e 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -1268,9 +1268,9 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
(13, 'batch_upload_patron_images', 'Upload patron images in batch or one at a time'),
(13, 'schedule_tasks', 'Schedule tasks to run')");
- $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('CheckSpecificUserPermissions','0','Check most specific staff user permissions',NULL,'YesNo')");
+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GranularPermissions','0','Use detailed staff user permissions',NULL,'YesNo')");
- print "Upgrade to $DBversion done (adding permissions and user_permissions tables and CheckSpecificUserPermissions syspref) ";
+ print "Upgrade to $DBversion done (adding permissions and user_permissions tables and GranularPermissions syspref) ";
SetVersion ($DBversion);
}
diff --git a/members/member-flags.pl b/members/member-flags.pl
index ac1ca5d..8901ed7 100755
--- a/members/member-flags.pl
+++ b/members/member-flags.pl
@@ -64,7 +64,7 @@ if ($input->param('newflags')) {
$sth = $dbh->prepare("UPDATE borrowers SET flags=? WHERE borrowernumber=?");
$sth->execute($module_flags, $member);
- if (C4::Context->preference('CheckSpecificUserPermissions')) {
+ if (C4::Context->preference('GranularPermissions')) {
# deal with subpermissions
$sth = $dbh->prepare("DELETE FROM user_permissions WHERE borrowernumber = ?");
$sth->execute($member);
@@ -102,7 +102,7 @@ if ($input->param('newflags')) {
checked => $checked,
flagdesc => $flagdesc );
- if (C4::Context->preference('CheckSpecificUserPermissions')) {
+ if (C4::Context->preference('GranularPermissions')) {
my @sub_perm_loop = ();
my $expand_parent = 0;
if ($checked) {
--
1.5.5.rc0.16.g02b00
More information about the Koha-patches
mailing list