summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-rw-r--r--template/en/default/account/prefs/permissions.html.tmpl18
-rw-r--r--template/en/default/admin/products/edit.html.tmpl3
-rw-r--r--template/en/default/admin/products/footer.html.tmpl2
-rw-r--r--template/en/default/admin/products/groupcontrol/edit.html.tmpl32
-rw-r--r--template/en/default/admin/users/confirm-delete.html.tmpl23
-rw-r--r--template/en/default/attachment/create.html.tmpl10
-rw-r--r--template/en/default/bug/create/create.html.tmpl2
-rw-r--r--template/en/default/filterexceptions.pl2
-rw-r--r--template/en/default/global/site-navigation.html.tmpl4
-rw-r--r--template/en/default/global/useful-links.html.tmpl5
-rw-r--r--template/en/default/global/user-error.html.tmpl14
11 files changed, 83 insertions, 32 deletions
diff --git a/template/en/default/account/prefs/permissions.html.tmpl b/template/en/default/account/prefs/permissions.html.tmpl
index 77dda1ce4..a178393ae 100644
--- a/template/en/default/account/prefs/permissions.html.tmpl
+++ b/template/en/default/account/prefs/permissions.html.tmpl
@@ -38,7 +38,6 @@
[% IF has_bits.size %]
You have the following permission [% terms.bits %] set on your account:
<p>
- <br>
<table align="center">
[% FOREACH bit_description = has_bits %]
<tr>
@@ -47,6 +46,23 @@
</tr>
[% END %]
</table>
+
+ [% FOREACH privs = ["editcomponents", "canconfirm", "editbugs"] %]
+ [% SET products = ${"local_$privs"} %]
+ [% IF products && products.size %]
+ <br>
+ <p>
+ You also have local '[% privs FILTER html %]' privileges
+ for the following products:
+ </p>
+ <p>
+ [% FOREACH product = products %]
+ [% product.name FILTER html %]<br>
+ [% END %]
+ </p>
+ [% END %]
+ [% END %]
+
[% ELSE %]
There are no permission [% terms.bits %] set on your account.
[% END %]
diff --git a/template/en/default/admin/products/edit.html.tmpl b/template/en/default/admin/products/edit.html.tmpl
index 0371e3343..72a5532aa 100644
--- a/template/en/default/admin/products/edit.html.tmpl
+++ b/template/en/default/admin/products/edit.html.tmpl
@@ -112,6 +112,9 @@ versions:</a>
[% g.othercontrol FILTER html %]
[% IF g.entry %], ENTRY[% END %]
[% IF g.canedit %], CANEDIT[% END %]
+ [% IF g.editcomponents %], editcomponents[% END %]
+ [% IF g.canconfirm %], canconfirm[% END %]
+ [% IF g.editbugs %], editbugs[% END %]
[% ELSE %]
DISABLED
[% END %]
diff --git a/template/en/default/admin/products/footer.html.tmpl b/template/en/default/admin/products/footer.html.tmpl
index 480868abd..a6330dbb2 100644
--- a/template/en/default/admin/products/footer.html.tmpl
+++ b/template/en/default/admin/products/footer.html.tmpl
@@ -45,7 +45,7 @@
<hr>
-[% UNLESS no_add_product_link %]
+[% UNLESS no_add_product_link || !user.in_group("editcomponents") %]
<a title="Add a product"
href="editproducts.cgi?action=add">Add</a> a product[% -%]
[%# Strictly speaking, we should not have to check for a
diff --git a/template/en/default/admin/products/groupcontrol/edit.html.tmpl b/template/en/default/admin/products/groupcontrol/edit.html.tmpl
index 32b5e9d8c..aff85be0d 100644
--- a/template/en/default/admin/products/groupcontrol/edit.html.tmpl
+++ b/template/en/default/admin/products/groupcontrol/edit.html.tmpl
@@ -42,6 +42,9 @@
<th>MemberControl</th>
<th>OtherControl</th>
<th>Canedit</th>
+ <th>editcomponents</th>
+ <th>canconfirm</th>
+ <th>editbugs</th>
<th>[% terms.Bugs %]</th>
</tr>
[% FOREACH group = groups %]
@@ -50,7 +53,7 @@
<td>
[% group.name FILTER html %]
</td>
- <td align="center" colspan=4>
+ <td align="center" colspan=7>
Disabled
</td>
<td>
@@ -119,6 +122,18 @@
[% " checked=\"checked\"" IF group.canedit %]>
</td>
<td>
+ <input type=checkbox value=1 name=editcomponents_[% group.id %]
+ [% " checked=\"checked\"" IF group.editcomponents %]>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=canconfirm_[% group.id %]
+ [% " checked=\"checked\"" IF group.canconfirm %]>
+ </td>
+ <td>
+ <input type=checkbox value=1 name=editbugs_[% group.id %]
+ [% " checked=\"checked\"" IF group.editbugs %]>
+ </td>
+ <td>
[% group.bugcount %]
</td>
</tr>
@@ -146,6 +161,21 @@ the groups with Canedit selected. ONLY users who are members of
all the canedit groups will be able to edit. This is an additional
restriction that further restricts what can be edited by a user.
<p>
+The following settings control let you choose privileges on a <b>per-product basis</b>.
+This is a convenient way to give privileges to some users for some products
+only, without having to give them global privileges which would affect all
+products:
+<p>
+Any group having <b>editcomponents</b> selected allows users who are
+in this group to edit all aspects of this product, including components,
+milestones and versions.
+<p>
+Any group having <b>canconfirm</b> selected allows users who are
+in this group to confirm [% terms.bugs %] in this product.
+<p>
+Any group having <b>editbugs</b> selected allows users who are
+in this group to edit all fields of [% terms.bugs %] in this product.
+<p>
The <b>MemberControl</b> and <b>OtherControl</b> fields
indicate which [% terms.bugs %] will be placed in
this group according to the following definitions.
diff --git a/template/en/default/admin/users/confirm-delete.html.tmpl b/template/en/default/admin/users/confirm-delete.html.tmpl
index 4c348fa10..0fd4aafa7 100644
--- a/template/en/default/admin/users/confirm-delete.html.tmpl
+++ b/template/en/default/admin/users/confirm-delete.html.tmpl
@@ -19,7 +19,6 @@
# listselectionvalues: selection values to recreate the current user
# list.
# editusers: is viewing user member of editusers?
- # editcomponents: is viewing user member of editcomponents?
# otheruser: Bugzilla::User object of the viewed user.
# reporter: number of bugs reported by the user
# assignee_or_qa: number of bugs the user is either the assignee
@@ -57,8 +56,8 @@
%]
[% responsibilityterms = {
- 'initialowner' => 'Default Assignee',
- 'initialqacontact' => 'Default QA Contact'
+ 'default_assignee' => 'Default Assignee',
+ 'default_qa_contact' => 'Default QA Contact'
}
%]
@@ -93,21 +92,21 @@
[% FOREACH component = otheruser.product_responsibilities %]
<li>
[% andstring = '' %]
- [% FOREACH responsibility = ['initialowner', 'initialqacontact'] %]
- [% IF component.$responsibility == otheruser.id %]
+ [% FOREACH responsibility = ['default_assignee', 'default_qa_contact'] %]
+ [% IF component.${responsibility}.id == otheruser.id %]
[% andstring %] [% responsibilityterms.$responsibility %]
[% andstring = ' and ' %]
[% END %]
[% END %]
for
- [% IF editcomponents %]
+ [% IF user.in_group("editcomponents", component.product_id) %]
<a href="editcomponents.cgi?action=edit&amp;product=
- [% component.productname FILTER url_quote %]&amp;component=
- [% component.componentname FILTER url_quote %]">
+ [% component.product.name FILTER url_quote %]&amp;component=
+ [% component.name FILTER url_quote %]">
[% END %]
- [%+ component.productname FILTER html %]:
- [% component.componentname FILTER html %]
- [% IF editcomponents %]
+ [%+ component.product.name FILTER html %]:
+ [% component.name FILTER html %]
+ [% IF user.in_group("editcomponents", component.product_id) %]
</a>
[% END %]
</li>
@@ -125,7 +124,7 @@
one product.
</p>
<p>
- [% IF editcomponents %]
+ [% IF user.in_group("editcomponents", component.product_id) %]
Change this by clicking the product editing links above,
[% ELSE %]
For now, you can
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl
index fa2692d85..381c75901 100644
--- a/template/en/default/attachment/create.html.tmpl
+++ b/template/en/default/attachment/create.html.tmpl
@@ -25,10 +25,10 @@
[% PROCESS global/variables.none.tmpl %]
[%# Define strings that will serve as the title and header of this page %]
-[% title = BLOCK %]Create New Attachment for [% terms.Bug %] #[% bugid %][% END %]
+[% title = BLOCK %]Create New Attachment for [% terms.Bug %] #[% bug.bug_id %][% END %]
[% header = BLOCK %]Create New Attachment for
- [%+ "$terms.Bug $bugid" FILTER bug_link(bugid) FILTER none %][% END %]
-[% subheader = BLOCK %][% bugsummary FILTER html %][% END %]
+ [%+ "$terms.Bug $bug.bug_id" FILTER bug_link(bug.bug_id) FILTER none %][% END %]
+[% subheader = BLOCK %][% bug.short_desc FILTER html %][% END %]
[% PROCESS global/header.html.tmpl
title = title
@@ -40,7 +40,7 @@
%]
<form name="entryform" method="post" action="attachment.cgi" enctype="multipart/form-data">
- <input type="hidden" name="bugid" value="[% bugid %]">
+ <input type="hidden" name="bugid" value="[% bug.bug_id %]">
<input type="hidden" name="action" value="insert">
<table class="attachment_entry">
@@ -66,7 +66,7 @@
</td>
</tr>
- [% IF (user.id != bugassignee_id) AND user.groups.editbugs %]
+ [% IF (user.id != bug.assigned_to.id) AND user.in_group("editbugs", bug.product_id) %]
<tr>
<th>Reassignment:</th>
<td>
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 62f8004f2..c27750e6c 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -476,7 +476,7 @@ function handleWantsAttachment(wants_attachment) {
</td>
</tr>
- [% IF user.in_group('editbugs') %]
+ [% IF user.in_group('editbugs', product.id) %]
[% IF use_keywords %]
<tr>
<td align="right" valign="top">
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index f8590fc28..ea5896730 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -424,7 +424,7 @@
],
'attachment/create.html.tmpl' => [
- 'bugid',
+ 'bug.bug_id',
'attachment.id',
],
diff --git a/template/en/default/global/site-navigation.html.tmpl b/template/en/default/global/site-navigation.html.tmpl
index cb57df610..7c2eabecf 100644
--- a/template/en/default/global/site-navigation.html.tmpl
+++ b/template/en/default/global/site-navigation.html.tmpl
@@ -111,8 +111,8 @@
href="editparams.cgi">' IF user.groups.tweakparams %]
[% '<link rel="Administration" title="Users"
href="editusers.cgi">' IF user.groups.editusers %]
- [% '<link rel="Administration" title="Products"
- href="editproducts.cgi">' IF user.groups.editcomponents %]
+ [% '<link rel="Administration" title="Products" href="editproducts.cgi">'
+ IF user.groups.editcomponents || user.get_products_by_permission("editcomponents").size %]
[% '<link rel="Administration" title="Flag Types"
href="editflagtypes.cgi">' IF user.groups.editcomponents %]
[% '<link rel="Administration" title="Groups"
diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl
index 079269b1b..8078a5d80 100644
--- a/template/en/default/global/useful-links.html.tmpl
+++ b/template/en/default/global/useful-links.html.tmpl
@@ -58,10 +58,13 @@
<li><span class="separator">[% sep %]</span><a href="editclassifications.cgi">Classifications</a></li>
[% sep = "| " %]
[% END %]
- [% IF user.groups.editcomponents %]
+ [% IF user.groups.editcomponents || user.get_products_by_permission("editcomponents").size %]
<li><span class="separator">[% sep %]</span><a href="editproducts.cgi">Products</a></li>
[% sep = "| " %]
+ [% END %]
+ [% IF user.groups.editcomponents %]
<li><span class="separator">[% sep %]</span><a href="editflagtypes.cgi">Flags</a></li>
+ [% sep = "| " %]
[% END %]
[% IF user.groups.admin %]
<li><span class="separator">[% sep %]</span><a href="editfields.cgi">Custom Fields</a></li>
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 6fc244fb5..d6b596ea5 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -917,11 +917,11 @@
[% title = "Missing Component" %]
[% admindocslinks = {'products.html' => 'Administering products',
'components.html' => 'Creating a component'} %]
- Sorry, the product <em>[% product FILTER html %]</em>
+ Sorry, the product <em>[% product.name FILTER html %]</em>
has to have at least one component in order for you to
enter [% terms.abug %] into it.<br>
- [% IF user.in_group("editcomponents") %]
- <a href="editcomponents.cgi?action=add&amp;product=[% product FILTER url_quote %]">Create
+ [% IF user.in_group("editcomponents", product.id) %]
+ <a href="editcomponents.cgi?action=add&amp;product=[% product.name FILTER url_quote %]">Create
a new component</a>.
[% ELSE %]
Please contact [% Param("maintainer") %] and ask them
@@ -989,11 +989,11 @@
[% ELSIF error == "missing_version" %]
[% title = "Missing Version" %]
[% admindocslinks = {'versions.html' => 'Defining versions'} %]
- Sorry, the product <em>[% product FILTER html %]</em>
+ Sorry, the product <em>[% product.name FILTER html %]</em>
has to have at least one version in order for you to
enter [% terms.abug %] into it.<p>
- [% IF user.in_group("editcomponents") %]
- <a href="editversions.cgi?action=add&amp;product=[% product FILTER url_quote %]">Create
+ [% IF user.in_group("editcomponents", product.id) %]
+ <a href="editversions.cgi?action=add&amp;product=[% product.name FILTER url_quote %]">Create
a new version</a>.
[% ELSE %]
Please contact [% Param("maintainer") %] and ask them
@@ -1213,7 +1213,7 @@
[% title = BLOCK %]Product closed for [% terms.Bugs %] Entry[% END %]
[% admindocslinks = {'products.html' => 'Administering products'} %]
Sorry, entering [% terms.bugs %] into the
- product <em>[% product FILTER html %]</em> has been disabled.
+ product <em>[% product.name FILTER html %]</em> has been disabled.
[% ELSIF error == "product_edit_denied" %]
[% title = "Product Edit Access Denied" %]