From 7d33443002e5da146e506f92600ff456571ac84a Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 11 Dec 2013 04:30:11 +0800 Subject: Bug 942725: backport bug 793963 to bmo (add the ability to tag comments with arbitrary tags) --- Bugzilla/User.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 4e4489935..727bb9f2c 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1876,6 +1876,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; @@ -2666,6 +2677,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 + +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 -- cgit v1.2.3-24-g4f1b