Commit b3389a8c authored by timeless%mozdev.org's avatar timeless%mozdev.org

Bug 365302 email userprefs doesn't tell you if you are a globalwatcher

r=lpsolit a=lpsolit
parent 9cd59148
...@@ -1513,6 +1513,16 @@ sub is_insider { ...@@ -1513,6 +1513,16 @@ sub is_insider {
return $self->{'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 { sub get_userlist {
my $self = shift; my $self = shift;
...@@ -2055,6 +2065,11 @@ moving is enabled. ...@@ -2055,6 +2065,11 @@ moving is enabled.
Returns true if the user can access private comments and attachments, 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. 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 =back
=head1 CLASS FUNCTIONS =head1 CLASS FUNCTIONS
......
...@@ -100,6 +100,16 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb ...@@ -100,6 +100,16 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb
<br> <br>
</td> </td>
</tr> </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> </table>
<hr> <hr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment