renamed CheckSpecificUserPermissions to GranularPermissions

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Galen Charlton 2008-04-10 11:37:49 -05:00 committed by Joshua Ferraro
parent 7a2a241fa3
commit 83f8e22aec
6 changed files with 10 additions and 10 deletions

View file

@ -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}) );

View file

@ -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";

View file

@ -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');

View file

@ -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');

View file

@ -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);
}

View file

@ -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) {