Skip to content

Commit

Permalink
Use the default_to_body permission also when creating updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
joesiltberg authored and dracos committed Apr 20, 2021
1 parent 7ae8bc4 commit b35dffd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Send email reports in staff-only categories.
- Fix Gaze sometimes being called twice on /around. #3324
- Improved alert signup for phone-only user. #3367
- The permission default_to_body now also affects updates. #3317
- Admin improvements:
- Enable per-category hint customisation.
- Move ban/unban buttons to user edit admin page.
Expand Down
4 changes: 2 additions & 2 deletions templates/web/base/report/update/form_user_loggedin.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
[% IF can_contribute_as_another_user OR can_contribute_as_body OR can_contribute_as_anonymous_user %]
<label for="form_as">[% loc('Provide update as') %]</label>
<select id="form_as" class="form-control js-contribute-as" name="form_as">
<option value="myself" selected>[% loc('Yourself') %]</option>
<option value="myself" [% c.user.from_body AND ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? '' : 'selected' %]>[% loc('Yourself') %]</option>
[% IF can_contribute_as_another_user %]
<option value="another_user">[% loc('Another user') %]</option>
[% END %]
[% IF can_contribute_as_anonymous_user %]
<option value="anonymous_user">[% loc('Anonymous user') %]</option>
[% END %]
[% IF can_contribute_as_body %]
<option value="body">[% c.user.from_body.name %]</option>
<option value="body" [% c.user.from_body AND ( c.user.has_body_permission_to('planned_reports') || c.user.has_body_permission_to('default_to_body') ) ? 'selected' : '' %]>[% c.user.from_body.name %]</option>
[% END %]
</select>
<label for="form_username">[% loc('Email address') %]</label>
Expand Down

0 comments on commit b35dffd

Please sign in to comment.