From bcab6fcb10aa88683490bef03c607173f9c0b063 Mon Sep 17 00:00:00 2001 From: Kent Rogers Date: Mon, 5 Jul 2010 14:49:52 -0700 Subject: Bug 514618: Allow restricting the visibility and values of fields by classification. r=mkanat, r=timello, a=mkanat --- Bugzilla/Product.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Bugzilla/Product.pm') diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm index 514649763..80e1752e6 100644 --- a/Bugzilla/Product.pm +++ b/Bugzilla/Product.pm @@ -791,6 +791,13 @@ sub flag_types { return $self->{'flag_types'}; } +sub classification { + my $self = shift; + $self->{'classification'} ||= + new Bugzilla::Classification($self->classification_id); + return $self->{'classification'}; +} + ############################### #### Accessors ###### ############################### @@ -853,6 +860,7 @@ Bugzilla::Product - Bugzilla product class. my $bug_ids = $product->bug_ids(); my $has_access = $product->user_has_access($user); my $flag_types = $product->flag_types(); + my $classification = $product->classification(); my $id = $product->id; my $name = $product->name; @@ -1021,6 +1029,14 @@ a group is valid in a particular product.) Returns: Two references to an array of flagtype objects. +=item C + + Description: Returns the classification the product belongs to. + + Params: none. + + Returns: A Bugzilla::Classification object. + =back =head1 SUBROUTINES -- cgit v1.2.3-24-g4f1b