summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin/products/groupcontrol/edit.html.tmpl
blob: 62e1439adac8c7ac980fc388660688d9cf1d0ebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
[%# This Source Code Form is subject to the terms of the Mozilla Public
  # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  #
  # This Source Code Form is "Incompatible With Secondary Licenses", as
  # defined by the Mozilla Public License, v. 2.0.
  #%]

[% title = BLOCK %]
    Edit Group Controls for [% product.name FILTER html %]
[% END %]
[% PROCESS global/header.html.tmpl 
  title = title
  style_urls = ['skins/standard/admin.css']
%]

[% display_headers = 1 %]
[% FOREACH group = product.group_controls(1).values.sort("name") %]
  [% NEXT UNLESS group.group.isactive OR group.bug_count %]
  [% IF display_headers %]
    [% display_headers = 0 %]
    <form method="post" action="editproducts.cgi">
      <input type="hidden" name="action" value="updategroupcontrols">
      <input type="hidden" name="product" value="[% product.name FILTER html %]">
      <input type="hidden" name="token" value="[% token FILTER html %]">

      <table id="form" cellspacing="0" cellpadding="4" border="1">
        <tr class="column_header">
          <th>Group</th>
          <th>Entry</th>
          <th>MemberControl</th>
          <th>OtherControl</th>
          <th>Canedit</th>
          <th>editcomponents</th>
          <th>canconfirm</th>
          <th>editbugs</th>
          <th>[% terms.Bugs %]</th>
        </tr>
  [% END %]
  [% IF !group.group.isactive %]
    <tr class="disabled">
      <td>[% group.group.name FILTER html %]</td>
      <td align="center" colspan="7">Disabled</td>
      <td>[% group.bug_count FILTER html %]</td>
    </tr>
  [% ELSE %]
    <tr>
      <td>[% group.group.name FILTER html %]</td>
      <td>
        <input type=checkbox value=1 name=entry_[% group.id %]
          [% " checked='checked'" IF group.entry %]>
      </td>
      <td>
        <select name="membercontrol_[% group.id %]">
          <option value=[% constants.CONTROLMAPNA %]
            [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPNA %]
            >NA
          </option>
          <option value=[% constants.CONTROLMAPSHOWN %]
            [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPSHOWN %]
            >Shown
          </option>
          <option value=[% constants.CONTROLMAPDEFAULT %]
            [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPDEFAULT %]
            >Default
          </option>
          <option value=[% constants.CONTROLMAPMANDATORY %]
            [% " selected='selected'" IF group.membercontrol == constants.CONTROLMAPMANDATORY %]
            >Mandatory
          </option>
        </select>
      </td>
      <td>
        <select name="othercontrol_[% group.id %]">
          <option value=[% constants.CONTROLMAPNA %]
            [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPNA %]
            >NA
          </option>
          <option value=[% constants.CONTROLMAPSHOWN %]
            [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPSHOWN %]
            >Shown
          </option>
          <option value=[% constants.CONTROLMAPDEFAULT %]
            [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPDEFAULT %]
            >Default
          </option>
          <option value=[% constants.CONTROLMAPMANDATORY %]
            [% " selected='selected'" IF group.othercontrol == constants.CONTROLMAPMANDATORY %]
            >Mandatory
          </option>
        </select>
      </td>
      <td>
        <input type=checkbox value=1 name=canedit_[% group.id %]
        [% " 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.bug_count || 0 FILTER html %]</td>
    </tr>
  [% END %]
[% END %]

[% IF display_headers %]
  <p>No groups are available for products.
  [% IF user.in_group('creategroups') %]
    <a href="editgroups.cgi?action=add">Create a new group</a>
  [% END %]
  </p>
[% ELSE %]
    </table>
    <br>
    <input type=submit name="submit" value="submit">
  </form>
[% END %]

<p>
These settings control the relationship of the groups to this
product.
</p>
<p>
If any group has <b>Entry</b> selected, then this product will
restrict [% terms.bug %] entry to only those users who are members of
[%+ IF Param('or_groups') %]at least one of[% ELSE %]all[% END %] the groups
with entry selected.
</p>
<p>
If any group has <b>Canedit</b> selected, then this product
will be read-only for any users who are not members of
[%+ IF Param('or_groups') %]one[% ELSE %]all[% END %] of the groups with
Canedit selected. ONLY users who are members of
[%+ IF Param('or_groups') %]at least one of[% ELSE %]all[% END %] the canedit groups
will be able to edit. This is an additional restriction that further restricts what can be edited by a user.
</p>
<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>
<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>
<p>
Any group having <b>canconfirm</b> selected allows users who are
in this group to confirm [% terms.bugs %] in this product.
</p>
<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>
<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.
</p>

<table border=1>
  <tr>
    <th>
      MemberControl
    </th>
    <th>
      OtherControl
    </th>
    <th>
      Interpretation
    </th>
  </tr>
  <tr>
    <td>
      NA
    </td>
    <td>
      NA
    </td>
    <td>
      [% terms.Bugs %] in this product are never associated with this group.
    </td>
  </tr>
  <tr>
    <td>
      Shown
    </td>
    <td>
      NA
    </td>
    <td>
      [% terms.Bugs %] in this product are permitted to be restricted to this
      group.  Users who are members of this group will be able to place [% terms.bugs %] in
      this group.
    </td>
  </tr>
  <tr>
    <td>
      Shown
    </td>
    <td>
      Shown
    </td>
    <td>
      [% terms.Bugs %] in this product can be placed in this group by anyone
      with permission to edit the [% terms.bug %] even if they are not a member
      of this group.
    </td>
  </tr>
  <tr>
    <td>
      Shown
    </td>
    <td>
      Default
    </td>
    <td>
      [% terms.Bugs %] in this product can be placed in this group by anyone
      with permission to edit the [% terms.bug %] even if they are not a member
      of this group. Non-members place [% terms.bugs %] in this group by default.
    </td>
  </tr>
  <tr>
    <td>
      Shown
    </td>
    <td>
      Mandatory
    </td>
    <td>
      [% terms.Bugs %] in this product are permitted to be restricted to this
      group.  Users who are members of this group will be able to place [% terms.bugs %]
       in this group.  Non-members will be forced to restrict [% terms.bugs %] to
       this group when they initially enter [% terms.abug %] in this product.
    </td>
  </tr>
  <tr>
    <td>
      Default
    </td>
    <td>
      NA
    </td>
    <td>
      [% terms.Bugs %] in this product are permitted to be restricted to this
      group and are placed in this group by default.  Users who are members of this
      group will be able to place [% terms.bugs %] in this group.
    </td>
  </tr>
  <tr>
    <td>
      Default
    </td>
    <td>
      Default
    </td>
    <td>
      [% terms.Bugs %] in this product are permitted to be restricted to this
      group and are placed in this group by default.  Users who are members of this group
      will be able to place [% terms.bugs %] in this group.  Non-members will be
      able to restrict [% terms.bugs %] to this group on entry and will do so by default.
    </td>
  </tr>
  <tr>
    <td>
      Default
    </td>
    <td>
      Mandatory
    </td>
    <td>
      [% terms.Bugs %] in this product are permitted to be restricted to this
      group and are placed in this group by default.  Users who are members of this group
      will be able to place [% terms.bugs %] in this group. Non-members will be forced
      to place [% terms.bugs %] in this group on entry.
    </td>
  </tr>
  <tr>
    <td>
      Mandatory
    </td>
    <td>
      Mandatory
    </td>
    <td>
      [% terms.Bugs %] in this product are required to be restricted to this
      group.  Users are not given any option.
    </td>
  </tr>
</table>
<p>
Please note that the above table delineates the only allowable combinations
for the <b>MemberControl</b> and <b>OtherControl</b> field settings.
Attempting to submit a combination not listed there (e.g. Mandatory/NA,
Default/Shown, etc.) will produce an error message.
</p>
[% PROCESS global/footer.html.tmpl %]