summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortimeless%mozdev.org <>2007-07-22 22:08:09 +0200
committertimeless%mozdev.org <>2007-07-22 22:08:09 +0200
commitb3389a8ce4312bbb7e27ffd17d454c35150c5888 (patch)
tree7dc368970e6e2eb5027f1cac3335ac901ef5e47c
parent9cd591485eb17d68ed5637b87d17cdad5536116a (diff)
downloadbugzilla-b3389a8ce4312bbb7e27ffd17d454c35150c5888.tar.gz
bugzilla-b3389a8ce4312bbb7e27ffd17d454c35150c5888.tar.xz
Bug 365302 email userprefs doesn't tell you if you are a globalwatcher
r=lpsolit a=lpsolit
-rw-r--r--Bugzilla/User.pm15
-rw-r--r--template/en/default/account/prefs/email.html.tmpl10
2 files changed, 25 insertions, 0 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index f13b94fbf..1a9729ee9 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -1513,6 +1513,16 @@ 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'});
+ $self->{'is_global_watcher'} = grep { $_ eq $self->login } @watchers;
+ }
+ return $self->{'is_global_watcher'};
+}
+
sub get_userlist {
my $self = shift;
@@ -2055,6 +2065,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<is_global_watcher>
+
+Returns true if the user is a global watcher,
+i.e. if the 'globalwatchers' parameter contains the user.
+
=back
=head1 CLASS FUNCTIONS
diff --git a/template/en/default/account/prefs/email.html.tmpl b/template/en/default/account/prefs/email.html.tmpl
index 1aa4dae76..617bec8c6 100644
--- a/template/en/default/account/prefs/email.html.tmpl
+++ b/template/en/default/account/prefs/email.html.tmpl
@@ -100,6 +100,16 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb
<br>
</td>
</tr>
+[% IF user.is_global_watcher %]
+ <tr>
+ <td width="150"></td>
+ <td>
+ You are watching all [% terms.bugs %]. To be removed from this role,
+ contact
+ <a href="mailto:[% Param("maintainer") %]">[% Param("maintainer") %]</a>.
+ </td>
+ </tr>
+[% END %]
</table>
<hr>