summaryrefslogtreecommitdiffstats
path: root/userprefs.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-11-11 01:51:27 +0100
committerlpsolit%gmail.com <>2006-11-11 01:51:27 +0100
commit0d3a72b793725118641c4d7abf511b4fc98f7aef (patch)
treec5a7b0fbcb401fdc3a083bb94b0b6345962d0bac /userprefs.cgi
parentbd49bafdb5915a8e738dcbb82c88e8ffdf65a769 (diff)
downloadbugzilla-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.gz
bugzilla-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.xz
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;
}