summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-11-25 09:21:03 +0100
committerByron Jones <bjones@mozilla.com>2013-11-25 09:21:03 +0100
commitba0765bf4dc468815e4fa45509010c0cd675e5b2 (patch)
tree32d979d1172495770a326f87f294c6f10a1eaa68 /Bugzilla/User.pm
parent0aade93cebf4192b240347e092a7e53a62436ea2 (diff)
downloadbugzilla-ba0765bf4dc468815e4fa45509010c0cd675e5b2.tar.gz
bugzilla-ba0765bf4dc468815e4fa45509010c0cd675e5b2.tar.xz
Bug 793963: add the ability to tag comments with arbitrary tags
r=dkl, a=glob
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 84487dbbe..7a067fce0 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -1852,6 +1852,17 @@ sub is_timetracker {
return $self->{'is_timetracker'};
}
+sub can_tag_comments {
+ my $self = shift;
+
+ if (!defined $self->{'can_tag_comments'}) {
+ my $group = Bugzilla->params->{'comment_taggers_group'};
+ $self->{'can_tag_comments'} =
+ ($group && $self->in_group($group)) ? 1 : 0;
+ }
+ return $self->{'can_tag_comments'};
+}
+
sub get_userlist {
my $self = shift;
@@ -2648,6 +2659,12 @@ i.e. if the 'insidergroup' parameter is set and the user belongs to this group.
Returns true if the user is a global watcher,
i.e. if the 'globalwatchers' parameter contains the user.
+=item C<can_tag_comments>
+
+Returns true if the user can attach tags to comments.
+i.e. if the 'comment_taggers_group' parameter is set and the user belongs to
+this group.
+
=back
=head1 CLASS FUNCTIONS