Index: mozilla/webtools/bugzilla/Bugzilla/User.pm =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v retrieving revision 1.153 diff -pu -r1.153 mozilla/webtools/bugzilla/Bugzilla/User.pm --- mozilla/webtools/bugzilla/Bugzilla/User.pm +++ mozilla/webtools/bugzilla/Bugzilla/User.pm @@ -1513,6 +1513,17 @@ sub is_insider { return $self->{'is_insider'}; } +sub is_global_watcher { + my $self = shift; + + if (!defined $self->{'is_global_watcher'}) { + my @watchers = split(/[,\s]+/, Bugzilla->params->{'globalwatchers'}); + my @foo = grep { $_ eq $self->login } @watchers; + $self->{'is_global_watcher'} = scalar(@foo) ? 1 : 0; + } + return $self->{'is_global_watcher'}; +} + sub get_userlist { my $self = shift; @@ -2055,6 +2066,11 @@ moving is enabled. Returns true if the user can access private comments and attachments, i.e. if the 'insidergroup' parameter is set and the user belongs to this group. +=item C + +Returns true if the user is a global watcher, +i.e. if the 'globalwatchers' parameter contains the user. + =back =head1 CLASS FUNCTIONS Index: mozilla/webtools/bugzilla/template/en/default/account/prefs/email.html.tmpl =================================================================== RCS file: /cvsroot/mozilla/webtools/bugzilla/template/en/default/account/prefs/email.html.tmpl,v retrieving revision 1.28 diff -pu -r1.28 mozilla/webtools/bugzilla/template/en/default/account/prefs/email.html.tmpl --- mozilla/webtools/bugzilla/template/en/default/account/prefs/email.html.tmpl +++ mozilla/webtools/bugzilla/template/en/default/account/prefs/email.html.tmpl @@ -100,6 +100,16 @@ document.write(' +[% IF user.is_global_watcher %] + + + + You are watching all [% terms.bugs %]. To be removed from this role, + contact + [% Param("maintainer") %]. + + +[% END %]