aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-11-11 00:51:27 +0000
committerlpsolit%gmail.com <>2006-11-11 00:51:27 +0000
commit0d3a72b793725118641c4d7abf511b4fc98f7aef (patch)
treec5a7b0fbcb401fdc3a083bb94b0b6345962d0bac /userprefs.cgi
parentBug 357482: Webservice should have a get_products method (diff)
downloadbugzilla-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.gz
bugzilla-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.bz2
bugzilla-0d3a72b793725118641c4d7abf511b4fc98f7aef.zip
Bug 189627: Implement per-product privileges - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi8
1 files changed, 7 insertions, 1 deletions
diff --git a/userprefs.cgi b/userprefs.cgi
index 4bb65c152..555b017a8 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -369,7 +369,13 @@ sub DoPermissions {
push(@set_bits, {"desc" => $desc, "name" => $nam});
}
}
-
+
+ # If the user has product specific privileges, inform him about that.
+ foreach my $privs (PER_PRODUCT_PRIVILEGES) {
+ next if $user->in_group($privs);
+ $vars->{"local_$privs"} = $user->get_products_by_permission($privs);
+ }
+
$vars->{'has_bits'} = \@has_bits;
$vars->{'set_bits'} = \@set_bits;
}