description => 'Can not be impersonated by other users',
inherited_by => ['bz_sudoers'],
},
+ {
+ name => 'bz_quip_moderators',
+ description => 'Can moderate quips',
+ },
);
use constant DEFAULT_CLASSIFICATION => {
Indicates user can configure whine reports for self.
</para>
</listitem>
- </varlistentry>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ bz_quip_moderators
+ </term>
+ <listitem>
+ <para>
+ Indicates user can moderate quips.
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>
check_hash_token($token, ['create-quips']);
# Add the quip
my $approved = (Bugzilla->params->{'quip_list_entry_control'} eq "open")
- || Bugzilla->user->in_group('admin') || 0;
+ || $user->in_group('bz_quip_moderators') || 0;
my $comment = $cgi->param("quip");
$comment || ThrowUserError("need_quip");
trick_taint($comment); # Used in a placeholder below
}
if ($action eq 'approve') {
- $user->in_group('admin')
- || ThrowUserError("auth_failure", {group => "admin",
+ $user->in_group('bz_quip_moderators')
+ || ThrowUserError("auth_failure", {group => "bz_quip_moderators",
action => "approve",
object => "quips"});
}
if ($action eq "delete") {
- Bugzilla->user->in_group("admin")
- || ThrowUserError("auth_failure", {group => "admin",
+ $user->in_group('bz_quip_moderators')
+ || ThrowUserError("auth_failure", {group => "bz_quip_moderators",
action => "delete",
object => "quips"});
my $quipid = $cgi->param("quipid");
</li>
<li>
moderated - quips can be entered, but need to be approved
- by an admin before they will be shown.
+ by a moderator before they will be shown.
</li>
<li>
closed - no new additions to the quips list are allowed.
<p>
<font color="red">
Your quip '<tt>[% added_quip FILTER html %]</tt>' has been added.
- [% IF Param("quip_list_entry_control") == "moderated" AND !user.in_group('admin') %]
+ [% IF Param("quip_list_entry_control") == "moderated" AND !user.in_group('bz_quip_moderators') %]
It will be used as soon as it gets approved.
[% END %]
</font>
<p>
You can extend the quip list. Type in something clever or funny or boring
(but not obscene or offensive, please) and bonk on the button.
- [% IF Param("quip_list_entry_control") == "moderated" AND !user.in_group('admin') %]
+ [% IF Param("quip_list_entry_control") == "moderated" AND !user.in_group('bz_quip_moderators') %]
Note that your quip has to be approved before it is used.
[% END %]
</p>
[% END %]
[% IF show_quips %]
- [% IF !user.in_group('admin') %]
+ [% IF !user.in_group('bz_quip_moderators') %]
<h2>
Existing quips:
</h2>
<p>
Those who like their wisdom in large doses can
<a href="quips.cgi?action=show">view
- [% IF user.in_group('admin') %]
+ [% IF user.in_group('bz_quip_moderators') %]
and edit
[% END %]
the whole quip list</a>.