diff options
author | lpsolit%gmail.com <> | 2006-11-11 01:51:27 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-11-11 01:51:27 +0100 |
commit | 0d3a72b793725118641c4d7abf511b4fc98f7aef (patch) | |
tree | c5a7b0fbcb401fdc3a083bb94b0b6345962d0bac /template/en/default/admin | |
parent | bd49bafdb5915a8e738dcbb82c88e8ffdf65a769 (diff) | |
download | bugzilla-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.gz bugzilla-0d3a72b793725118641c4d7abf511b4fc98f7aef.tar.xz |
Bug 189627: Implement per-product privileges - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'template/en/default/admin')
4 files changed, 46 insertions, 14 deletions
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&product= - [% component.productname FILTER url_quote %]&component= - [% component.componentname FILTER url_quote %]"> + [% component.product.name FILTER url_quote %]&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 |