Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
95bfc797
Commit
95bfc797
authored
Jan 28, 2011
by
David Lawrence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 622080 - Change group which can moderate quips
r/a=mkanat
parent
f6142bf5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
11 deletions
+26
-11
Install.pm
Bugzilla/Install.pm
+4
-0
using.xml
docs/en/xml/using.xml
+12
-1
quips.cgi
quips.cgi
+5
-5
query.html.tmpl
template/en/default/admin/params/query.html.tmpl
+1
-1
quips.html.tmpl
template/en/default/list/quips.html.tmpl
+4
-4
No files found.
Bugzilla/Install.pm
View file @
95bfc797
...
...
@@ -149,6 +149,10 @@ use constant SYSTEM_GROUPS => (
description
=>
'Can not be impersonated by other users'
,
inherited_by
=>
[
'bz_sudoers'
],
},
{
name
=>
'bz_quip_moderators'
,
description
=>
'Can moderate quips'
,
},
);
use
constant
DEFAULT_CLASSIFICATION
=>
{
...
...
docs/en/xml/using.xml
View file @
95bfc797
...
...
@@ -1375,7 +1375,18 @@
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>
...
...
quips.cgi
View file @
95bfc797
...
...
@@ -79,7 +79,7 @@ if ($action eq "add") {
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
...
...
@@ -91,8 +91,8 @@ if ($action eq "add") {
}
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"
});
...
...
@@ -131,8 +131,8 @@ if ($action eq 'approve') {
}
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"
);
...
...
template/en/default/admin/params/query.html.tmpl
View file @
95bfc797
...
...
@@ -32,7 +32,7 @@
</li>
<li>
moderated - quips can be entered, but need to be approved
by a
n 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.
...
...
template/en/default/list/quips.html.tmpl
View file @
95bfc797
...
...
@@ -37,7 +37,7 @@
<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>
...
...
@@ -66,7 +66,7 @@
<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>
...
...
@@ -86,7 +86,7 @@
[% END %]
[% IF show_quips %]
[% IF !user.in_group('
admin
') %]
[% IF !user.in_group('
bz_quip_moderators
') %]
<h2>
Existing quips:
</h2>
...
...
@@ -163,7 +163,7 @@
<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>.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment