Bug 30418: Re-order options of who can edit list contents

The 'Allow changes to contents from' dropdown when creating/edit lists
should be most locked down to least locked down:

1. Nobody
2. Owner only
3. Permitted staff only
4. Staff only
5. Anyone seeing this list

Sponsored-by: Catalyst IT, New Zealand

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Alex Buckley 2022-08-24 01:01:33 +00:00 committed by Tomas Cohen Arazi
parent 2b22290256
commit f4f5d0d2f7
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 15 additions and 14 deletions

View File

@ -37,28 +37,27 @@
<option value="1">Owner only</option>
[% END %]
[% IF shelf.allow_change_from_others %]
<option value="2" selected="selected">Anyone seeing this list</option>
[% IF shelf.allow_change_from_permitted_staff %]
<option value="4" selected="selected">Permitted staff only</option>
[% ELSE %]
<option value="2">Anyone seeing this list</option>
<option value="4">Permitted staff only</option>
[% END %]
[% IF shelf.allow_change_from_staff %]
<option value="3" selected="selected">Staff only</option>
[% ELSE %]
<option value="3">Staff only</option>
[% END %]
[% IF shelf.allow_change_from_permitted_staff %]
<option value="4" selected="selected">Permitted staff only</option>
[% IF shelf.allow_change_from_others %]
<option value="2" selected="selected">Anyone seeing this list</option>
[% ELSE %]
<option value="4">Permitted staff only</option>
<option value="2">Anyone seeing this list</option>
[% END %]
</select>
&emsp; <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
&emsp; <span id="staff_remark" style="display:none;color:red;">The Staff only permission has no actual effect while this list is strictly private.</span>
&emsp; <span id="permitted_staff_remark" style="display:none;color:red;">The Permitted staff only permission has no actual effect while this list is strictly private.</span>
&emsp; <span id="staff_remark" style="display:none;color:red;">The Staff only permission has no actual effect while this list is strictly private.</span>
&emsp; <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
</li>
[% END %]
</head>

View File

@ -48,15 +48,17 @@
<option value="1">Owner only</option>
[% END %]
[% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %]
[% IF staffuser == 1 %][% IF shelf.allow_change_from_staff %]<option value="3" selected="selected">Staff only</option>[% ELSE %]<option value="3">Staff only</option>[% END %][% END %]
[% IF permitteduser == 1 %][% IF shelf.allow_change_from_permitted_staff %]<option value="4" selected="selected">Permitted staff only</option>[% ELSE %]<option value="4">Permitted staff only</option>[% END %][% END %]
[% IF staffuser == 1 %][% IF shelf.allow_change_from_staff %]<option value="3" selected="selected">Staff only</option>[% ELSE %]<option value="3">Staff only</option>[% END %][% END %]
[% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %]
</select>
&emsp; <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
&emsp; <span id="permitted_staff_remark" style="display:none;color:red;">The "Permitted staff only" permission has no actual effect while this list is strictly private.</span>
&emsp; <span id="staff_remark" style="display:none;color:red;">The "Staff only" permission has no actual effect while this list is strictly private.</span>
&emsp; <span id="permitted_staff_remark" style="display:none;color:red;">The "Permitted staff only" permission has no actual effect while this list is strictly private.</span>
&emsp; <span id="anyone_remark" style="display:none;color:red;">The "Anyone" permission has no actual effect while this list is strictly private.</span>
</li>
[% END %]