summaryrefslogtreecommitdiffstats
path: root/editproducts.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'editproducts.cgi')
-rwxr-xr-xeditproducts.cgi13
1 files changed, 4 insertions, 9 deletions
diff --git a/editproducts.cgi b/editproducts.cgi
index e29fd975d..8fe1a5ec5 100755
--- a/editproducts.cgi
+++ b/editproducts.cgi
@@ -244,15 +244,10 @@ Bugzilla->login(LOGIN_REQUIRED);
print Bugzilla->cgi->header();
-unless (UserInGroup("editcomponents")) {
- PutHeader("Not allowed");
- print "Sorry, you aren't a member of the 'editcomponents' group.\n";
- print "And so, you aren't allowed to add, modify or delete products.\n";
- PutTrailer();
- exit;
-}
-
-
+UserInGroup("editcomponents")
+ || ThrowUserError("auth_failure", {group => "editcomponents",
+ action => "edit",
+ object => "products"});
#
# often used variables