From 0a4c5b76c11470a17a8a5bf38dc066e1bef45ba9 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 17 Jul 2006 19:39:14 +0000 Subject: [PATCH] adding grant flag manipulation to the bootstrapper git-svn-id: svn://svn.open-ils.org/ILS/trunk@5047 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/cgi-bin/usr_group-setup.cgi | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/cgi-bin/usr_group-setup.cgi b/Open-ILS/src/cgi-bin/usr_group-setup.cgi index 3affb33db0..56b321abbf 100755 --- a/Open-ILS/src/cgi-bin/usr_group-setup.cgi +++ b/Open-ILS/src/cgi-bin/usr_group-setup.cgi @@ -42,10 +42,12 @@ if (my $action = $cgi->param('action')) { if (my $id = $cgi->param('permission_'.$perm->id) ) { my $p = permission::grp_perm_map->search({perm=>$id,grp=>$grp->id})->next; my $d = $cgi->param("depth_$id"); + my $g = $cgi->param("grant_$id") || 'f'; if (!$p) { - $p = permission::grp_perm_map->create({perm=>$id,grp=>$grp->id,depth=>$d}); + $p = permission::grp_perm_map->create({perm=>$id,grp=>$grp->id,depth=>$d,grantable=>$g}); } else { $p->depth( $d ); + $p->grantable( $g ); } $p->update; } else { @@ -172,7 +174,7 @@ print < -
+
HEADER #------------------------------------------------------------------------------- @@ -227,7 +229,7 @@ if (my $action = $cgi->param('action')) { print "
". "\n". - ""; + ""; for my $perm ( sort {$a->code cmp $b->code} permission::perm_list->retrieve_all ) { my $grp = $node; @@ -252,6 +254,21 @@ if (my $action = $cgi->param('action')) { }.">".$outype->name.""; } $out .= ""; + $out .= "
PermissionSelectAt Depth
PermissionSelectAt DepthGrantable
search( + { grp => $grp->id, + perm => $perm->id } + )->next; + $stuff = "checked='checked' " if ($setting && $setting->grantable); + } + } while (!$stuff && $grp && ($grp = $grp->parent)); + $stuff; + }.">"; + $grp = $node; print Tr( "".$perm->code."". "